Skip to content

Commit

Permalink
Merge pull request #333 from qonto/release-workflow-ci
Browse files Browse the repository at this point in the history
Add release workflow
  • Loading branch information
Michele Gerarduzzi authored Dec 28, 2023
2 parents 291b0d7 + ce645cf commit 4128458
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: release
on: workflow_dispatch
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Verify branch name
if: github.ref != 'refs/heads/main'
run: |
echo "🚨 The release must start from the main branch!"
exit 1
- name: Configure releaser details
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Install pnpm
uses: wyvox/action-setup-pnpm@v3
with:
pnpm-version: 8.5.1
node-version: 18.x
node-registry-url: "https://registry.npmjs.org"

- name: Trigger release script
run: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .release-it.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ module.exports = {
},
git: {
tagName: "v${version}",
commitMessage: "chore: release v${version}",
},
github: {
release: true,
tokenRef: "GITHUB_AUTH",
},
npm: false,
};
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4128458

Please sign in to comment.