Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoH2O1999 committed Mar 6, 2023
1 parent f90fdd4 commit f6ad64c
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release action

on:
release:
types:
- "created"

jobs:
# Create strategy matrix with a python script
create_matrix:
name: Create matrix
runs-on: ubuntu-latest
outputs:
matrix-json: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Update pip
run: python -m pip install --upgrade pip
- name: Install wheel
run: pip install wheel
- name: Install requirements
run: pip install -r ./.github/scripts/requirements.txt
- name: Create matrix
id: matrix
run: python ./.github/scripts/create_python_matrix.py

# Test the action with all possible combinations of python versions and os
test_action:
needs: create_matrix
runs-on: ${{ matrix.os }}
name: Test setup Python ${{ matrix.python-version }} for ${{ matrix.os }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.create_matrix.outputs.matrix-json) }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Python ${{ matrix.python-version }}
uses: ./
with:
python-version: ${{ matrix.python-version }}
allow-build: info
- name: Check Python version
run: python ./.github/scripts/check_python_version.py ${{ matrix.python-version }}

# Update tags
update_tags:
needs: test_action
runs-on: ubuntu-latest
name: Update version tags
steps:
- name: Update tags
uses: actions/[email protected]
with:
source-tag: ${{ github.event.release.tag_name }}

0 comments on commit f6ad64c

Please sign in to comment.