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 8baac1f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 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:
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
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm ci
- name: Release
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
"name": "math-utils",
"name": "@flowup/releases-example-lib",
"version": "0.0.0",
"license": "MIT",
"author": "Matěj Chalk <[email protected]>",
"repository": {
"type": "git",
"url": "https://github.com/flowup/releases-example-lib.git"
"url": "git+https://github.com/flowup/releases-example-lib.git"
},
"homepage": "https://github.com/flowup/releases-example-lib#readme",
"bugs": {
"url": "https://github.com/flowup/releases-example-lib/issues"
},
"publishConfig": {
"access": "public",
"registry": "https://npm.pkg.github.com"
},
"type": "module",
Expand All @@ -20,7 +21,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 8baac1f

Please sign in to comment.