release #9
This file contains 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 | |
on: | |
workflow_run: | |
workflows: ['deploy'] | |
types: | |
- completed | |
permissions: | |
contents: write | |
id-token: write | |
concurrency: | |
group: 'release' | |
cancel-in-progress: true | |
jobs: | |
release: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.9' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Import GPG key | |
env: | |
GPG_PRIVATE_KEY: ${{ secrets.SEMANTIC_RELEASE_GPG_PRIVATE_KEY }} | |
run: | | |
echo "$GPG_PRIVATE_KEY" > private.key | |
gpg --batch --import private.key | |
git config --global commit.gpgSign true | |
git config --global user.signingkey 89AE9225AE159D89 | |
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf | |
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf | |
gpgconf --kill gpg-agent | |
- name: Run semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GIT_AUTHOR_NAME: 'drackp2m-semantic-release-bot' | |
GIT_AUTHOR_EMAIL: '[email protected]' | |
GIT_COMMITTER_NAME: 'drackp2m-semantic-release-bot' | |
GIT_COMMITTER_EMAIL: '[email protected]' | |
run: node --run release |