Merge pull request #127 from kjsanger/devel #15
Workflow file for this run
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 release" | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l -e -o pipefail {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Fetch Tags" | |
run: git fetch --tags --force | |
- name: "Set up Python" | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
architecture: "x64" | |
- name: "Install Dependencies" | |
run: | | |
pip install --upgrade pip | |
pip install build | |
- name: "Build Package" | |
run: python -m build | |
- name: "Get release variables" | |
run: | | |
echo RELEASE_VERSION=$(git describe --always --tags --dirty) >> $GITHUB_ENV | |
echo MASTER_SHA=$(git rev-parse origin/master) >> $GITHUB_ENV | |
- name: "Create Release" | |
uses: ncipollo/release-action@v1.10.0 | |
with: | |
name: ${{ env.RELEASE_VERSION }} | |
prerelease: ${{ !(github.sha == env.MASTER_SHA) }} | |
artifacts: "dist/*.tar.gz" | |
removeArtifacts: true | |
artifactErrorsFailBuild: true | |
generateReleaseNotes: true |