0.2.5 commit for tests only #54
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: 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: Triggered by new release | |
run: | | |
if [[ ${{ startsWith(github.event.head_commit.message, '[0-9]+.[0-9]+.[0-9]+') }} ]]; then | |
echo "${{ github.event.head_commit.message }}" | |
echo "Foo" | |
- 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: Check Tag | |
id: check-tag | |
run: | | |
if [[ ${{ github.event.head_commit.message }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | |
echo "match=true" >> $GITHUB_OUTPUT | |
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 }} |