Skip to content

.github/workflows/version.yml #79

.github/workflows/version.yml

.github/workflows/version.yml #79

Workflow file for this run

---
"on":
schedule:
# 18:00 on Friday
- cron: 0 18 * * 5
workflow_dispatch:
# https://github.com/softprops/action-gh-release/issues/236
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
fetch-depth: 0
- name: Update version
run: |
scripts/update-version.pl pyproject.toml package.json \
packages/x/xmake/xmake.lua
- name: Read version
id: version
run: echo "tag=$(jq -r .version package.json)" >> "$GITHUB_OUTPUT"
- name: Check if tag exists
id: check
run: |
if git rev-parse "refs/tags/${{ steps.version.outputs.tag }}" >/dev/null 2>&1; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
- uses: stefanzweifel/git-auto-commit-action@v5
with:
tagging_message: ${{ steps.check.outputs.exists == 'false' && steps.version.outputs.tag || '' }}