Skip to content

Commit

Permalink
Adding release action
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeHagar committed Mar 2, 2024
1 parent 3266cf8 commit 5d37e9a
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release GitHub Action

on:
push:
branches:
- main
workflow_dispatch:

permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write

jobs:
release:
runs-on: ubuntu-latest
concurrency:
group: release-action
cancel-in-progress: true
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
with:
node-version: "20"

- name: Run install
uses: borales/actions-yarn@v5
with:
cmd: install

- name: Run build
uses: borales/actions-yarn@v5
with:
cmd: build

- name: Get package info
id: package-info
uses: luizfelipelaviola/get-package-info@v1
with:
path: .

- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish or Update Draft Release
run: |
gh release create --draft ${{ steps.package-info.outputs.version }} --title "Release ${{ steps.package-info.outputs.version }}" --notes "${{ steps.github_release.outputs.changelog }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: stefanzweifel/git-auto-commit-action@v5

0 comments on commit 5d37e9a

Please sign in to comment.