diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..f62e41c3d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Release + +on: + push: + tags: + - "v*" + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - id: major_version + run: > + echo major_version=$( + echo ${{ github.ref }} | cut -d'v' -f2 | cut -d'.' -f1 + ) >> $GITHUB_OUTPUT + - id: is_release_candidate + run: > + echo is_release_candidate=$( + echo ${{ github.ref }} | grep -c 'rc' + ) >> $GITHUB_OUTPUT + - name: Create release + uses: softprops/action-gh-release@v1 + with: + prerelease: ${{ steps.major_version.outputs.major_version == 0 || steps.is_release_candidate.outputs.is_release_candidate == 1 }} + generate_release_notes: true + files: nb