generated from actions/javascript-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |