Skip to content

Commit

Permalink
ci: added release templates
Browse files Browse the repository at this point in the history
  • Loading branch information
czernika committed Nov 25, 2024
1 parent 25456ed commit 5aa05ff
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish release

on:
workflow_dispatch:
release:
types:
- published

env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
HUSKY: 0

jobs:
deploy:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ env.NODE_AUTH_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ jobs:
strategy:
fail-fast: true
matrix:
node-version: [18, 20, 22, 23]
node-version: [20, 22, 23]

name: NodeJS ${{ matrix.node-version }}

steps:
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2

- name: Install dependencies
run: bun install
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Update Changelog

on:
release:
types: [released]

jobs:
update:
runs-on: ubuntu-22.04

permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.target_commitish }}

- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ github.event.release.tag_name }}
release-notes: ${{ github.event.release.body }}

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: ${{ github.event.release.target_commitish }}
commit_message: 'chore: update CHANGELOG'
file_pattern: CHANGELOG.md

0 comments on commit 5aa05ff

Please sign in to comment.