|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 2 | +# contributor license agreements. See the NOTICE file distributed with |
| 3 | +# this work for additional information regarding copyright ownership. |
| 4 | +# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 5 | +# (the "License"); you may not use this file except in compliance with |
| 6 | +# the License. You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | + |
| 16 | +name: Create Source Release |
| 17 | + |
| 18 | +on: |
| 19 | + workflow_dispatch: |
| 20 | + |
| 21 | +jobs: |
| 22 | + build: |
| 23 | + runs-on: ubuntu-latest |
| 24 | + |
| 25 | + steps: |
| 26 | + - name: Checkout code |
| 27 | + uses: actions/checkout@v2 |
| 28 | + |
| 29 | + - name: Setup GPG |
| 30 | + env: |
| 31 | + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} |
| 32 | + run: | |
| 33 | + mkdir -p ~/.gnupg |
| 34 | + chmod 700 ~/.gnupg |
| 35 | + echo $GPG_PRIVATE_KEY | base64 --decode | gpg --batch --import --yes |
| 36 | + echo "use-agent" >> ~/.gnupg/gpg.conf |
| 37 | + echo "pinentry-program /usr/bin/pinentry" >> ~/.gnupg/gpg-agent.conf |
| 38 | + echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf |
| 39 | +
|
| 40 | + - name: Create source release |
| 41 | + env: |
| 42 | + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |
| 43 | + run: | |
| 44 | + mkdir -p output |
| 45 | + chmod +x tools/releasing/create_source_release.sh |
| 46 | + OUTPUT_DIR=output GPG_PASSPHRASE=$GPG_PASSPHRASE tools/releasing/create_source_release.sh |
| 47 | +
|
| 48 | + - name: Upload source release |
| 49 | + uses: actions/upload-artifact@v4 |
| 50 | + with: |
| 51 | + name: source-release |
| 52 | + path: output/* |
0 commit comments