Skip to content

Commit

Permalink
[#4] Add GPG Keys on main
Browse files Browse the repository at this point in the history
  • Loading branch information
dedenbangkit committed Jul 25, 2024
1 parent e29fa96 commit 476867c
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,31 @@ jobs:
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git checkout -b release-branch
git add package.json
git commit -m "chore(release): ${{ steps.bump_version.outputs.new_version }}"
git tag ${{ steps.bump_version.outputs.new_version }}
git push origin HEAD --tags
git commit -S -m "chore(release): ${{ steps.bump_version.outputs.new_version }}"
git push origin release-branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Create Pull Request
id: create_pr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore(release): ${{ steps.bump_version.outputs.new_version }}'
branch: release-branch
title: 'Release ${{ steps.bump_version.outputs.new_version }}'
body: 'Automated release of version ${{ steps.bump_version.outputs.new_version }}'

- name: Build the project
if: github.event_name == 'pull_request'
run: yarn build

- name: Publish to npm
if: github.event_name == 'pull_request' && github.event.pull_request.merged
run: yarn publish --non-interactive
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 476867c

Please sign in to comment.