Skip to content

Staging

Staging #22

Workflow file for this run

name: CI-CD
# This code is a basic example of a CI/CD pipeline that uses Pixi and Semantic Release to automate the release process.
on:
push:
branches: [ '*' ]
pull_request:
branches: [ 'main' , 'staging']
jobs:
Run-A-Pixi-Job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run A Pixi Job
run: echo "Running a Pixi Job"
- name: Setup Pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.18.0
log-level: vv
manifest-path: pyproject.toml
- name: Run Pixi
run: |
pixi run python --version | grep 3.12
pixi run test | grep "Hello, World"
Semantic-Release:
runs-on: ubuntu-latest
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging' )
needs: Run-A-Pixi-Job
concurrency: release
permissions:
id-token: write
contents: write
packages: write
actions: read
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.SEMVERPOLICE_ID }}
private-key: ${{ secrets.SEMVER_APP_KEY }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
with:
root_options: -vv
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: 'gh-actions-semver'