Skip to content

Commit

Permalink
Move versioning workflow to master
Browse files Browse the repository at this point in the history
  • Loading branch information
dalmijn committed Oct 3, 2024
1 parent 5bdccef commit c0192f3
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

---
name: Versioning

on:
repository_dispatch:
types: [ docs-updated ]
workflow_dispatch:

jobs:
Versioning:
defaults:
run:
shell: bash -l {0}

strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.12"]
include:
- os: ubuntu-latest
label: linux-64

name: ${{ matrix.os }} - py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: gh-pages

- name: Run versioning script
id: check
run: |
python .scripts/version.py
continue-on-error: true

- name: Adjust stable symbolic link
if: ${{ steps.check.outcome == 'success' }}
run: |
ln -sfn ${{ env.NEW_STABLE_VERSION }} stable
- name: Commit and push changes
if: ${{ steps.check.outcome == 'success' }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Added version ${{ env.NEW_STABLE_VERSION }}"
git push

0 comments on commit c0192f3

Please sign in to comment.