Release Repositories #278
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Repositories | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Input tag to release, e.g. v3.2.0 .' | |
| required: true | |
| default: '' | |
| jobs: | |
| release: | |
| name: Release ${{ github.event.inputs.tag }} | |
| if: github.repository == 'friendsofhyperf/components' | |
| runs-on: ubuntu-22.04 | |
| env: | |
| SSH_PRIVATE_KEY: ${{ secrets.SPLIT_PRIVATE_KEY }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Private Key | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa | |
| chmod 600 ~/.ssh/id_rsa | |
| echo "StrictHostKeyChecking no" >> ~/.ssh/config | |
| - name: Release | |
| run: | | |
| git config pull.rebase true | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "Deeka Wong" | |
| if [ -z "${{ github.event.inputs.tag }}" ]; then | |
| echo "Please input tag." | |
| exit 1 | |
| else | |
| ./bin/release.sh ${{ github.event.inputs.tag }} | |
| fi |