diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 23f297b..6292d2b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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