Skip to content

Commit

Permalink
ci: release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
matejchalk committed Jun 14, 2024
1 parent 1e465be commit 34b2f5e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
push:
branches:
- main

permissions:
contents: read # for checkout

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Install dependencies
run: npm ci
- name: Release
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"src"
],
"scripts": {
"test": "node --test"
"test": "node --test",
"release": "semantic-release"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
Expand Down

0 comments on commit 34b2f5e

Please sign in to comment.