11.0.0.0 #123
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
name: Tag Release | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check for release version | |
uses: actions/github-script@v7 | |
id: check | |
with: | |
script: | | |
const { owner, repo } = context.repo | |
const regex = /\d+\.\d+\.\d+\.\d+/g; | |
if (regex.test(`${{ github.event.head_commit.message }}`)) { | |
return "build" | |
} else { | |
const run_id = "${{ github.run_id }}"; | |
await github.rest.actions.cancelWorkflowRun({ owner, repo, run_id }); | |
} | |
result-encoding: string | |
tag: | |
needs: check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run Luacheck | |
uses: nebularg/actions-luacheck@v1 | |
with: | |
args: --no-color -q | |
annotate: warning | |
- name: Set release | |
uses: onemedical/action-general-autotag@71b52145bca291a545a8abbbae3acc2ef56ad30e | |
with: | |
GITHUB_TOKEN: ${{ secrets.REPOSITORY_ACCESS_TOKEN }} | |
source_file: "Aurora.toc" | |
extraction_regex: "\\s*##\\s*Version\\s*:\\s*(\\d+\\.\\d+\\.\\d+.\\d+)" | |
tag_format: "{version}" | |
tag_message: "release" |