mirror of
https://github.com/LukeHagar/stats-action.git
synced 2025-12-06 04:21:26 +00:00
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
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
|