Skip to content

0.2.5

0.2.5 #68

name: Create new release
on:
push:
branches:
- main
jobs:
quality:
name: Run project test set
uses: ./.github/workflows/python-tests.yml
with:
target_workflow: ./.github/workflows/python-tests.yml
release:
needs: quality
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write
steps:
- name: Regex Match
uses: actions-ecosystem/[email protected]
id: regex
with:
text: ${{ github.event.head_commit.message }}
regex: '/^[0-9]+\.[0-9]+\.[0-9]+/.*'
- name: Deploy
if: steps.regex.outputs.matched == 'true'
run: |
echo "Foobar!"
- name: Not triggered by new release
if: ${{ ! startsWith(github.event.head_commit.message, '/^[0-9]+\.[0-9]+\.[0-9]+/' ) }}
run: |
echo "${{ github.event.head_commit.message }}"
echo "Bar"
- name: Triggered by new release
if: ${{ startsWith(github.event.head_commit.message, '/^[0-9]+\.[0-9]+\.[0-9]+/' ) }}
run: |
echo "${{ github.event.head_commit.message }}"
echo "Foo"
- name: Check Tag
id: check-tag
run: |
if [[ "${{ github.event.head_commit.message }}" =~ /[0-9]+\.[0-9]+\.[0-9]+/ ]]; then
echo "::set-output name=match::true"
fi
- name: Build
if: steps.check-tag.outputs.match == 'true'
run: |
echo "Tag is a match"
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.RELEASE_TOKEN }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install Python dependencies
run:
pip install -r requirements.txt
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}