Skip to content

Commit

Permalink
ci(release): add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
amimart committed Aug 9, 2024
1 parent b8beee3 commit 00554ca
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Release

on:
workflow_dispatch:

jobs:
lint:
if: github.ref == 'refs/heads/main' && github.actor == 'bot-anik'
uses: ./.github/workflows/lint.yml

build:
if: github.ref == 'refs/heads/main' && github.actor == 'bot-anik'
uses: ./.github/workflows/build.yml

test:
if: github.ref == 'refs/heads/main' && github.actor == 'bot-anik'
uses: ./.github/workflows/test.yml

perfom-release:
if: github.ref == 'refs/heads/main' && github.actor == 'bot-anik'
needs:
- lint
- build
- test
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
token: ${{ secrets.OPS_TOKEN }}

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.BOT_GPG_PASSPHRASE }}
git_config_global: true
git_user_signingkey: true
git_commit_gpgsign: true

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Release project
uses: cycjimmy/semantic-release-action@v4
with:
semantic_version: 22.0.5
branch: main
extra_plugins: |
@semantic-release/changelog
@semantic-release/exec
@semantic-release/git
semantic-release-replace-plugin@1.2.7
extends: |
conventional-changelog-conventionalcommits@7.0.1
env:
GITHUB_TOKEN: ${{ secrets.OPS_TOKEN }}
GIT_AUTHOR_NAME: ${{ vars.BOT_GIT_AUTHOR_NAME }}
GIT_AUTHOR_EMAIL: ${{ vars.BOT_GIT_AUTHOR_EMAIL }}
GIT_COMMITTER_NAME: ${{ vars.BOT_GIT_COMMITTER_NAME }}
GIT_COMMITTER_EMAIL: ${{ vars.BOT_GIT_COMMITTER_EMAIL }}

0 comments on commit 00554ca

Please sign in to comment.