mirror of
https://github.com/LukeHagar/stats-action.git
synced 2025-12-06 04:21:26 +00:00
Adding release action
This commit is contained in:
55
.github/workflows/release.yaml
vendored
Normal file
55
.github/workflows/release.yaml
vendored
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user