Skip to content

Commit

Permalink
chore: add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwep committed Dec 10, 2023
1 parent 5a67c21 commit 1cb4f53
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ jobs:
name: Build app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

Expand All @@ -39,6 +42,31 @@ jobs:
name: app
path: dist

publish_release:
if: startsWith(github.event.ref, 'refs/tags/v')
name: Publish new release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3

- name: Extract changes
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}

- name: Publish release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body: ${{ steps.changelog.outputs.changes }}

build_docker:
if: startsWith(github.event.ref, 'refs/tags/v')
name: Build and publish docker image
Expand Down

0 comments on commit 1cb4f53

Please sign in to comment.