Skip to content

Merge pull request #493 from tweag/release-0.11.1 #12

Merge pull request #493 from tweag/release-0.11.1

Merge pull request #493 from tweag/release-0.11.1 #12

Workflow file for this run

# Cut a release whenever a new tag is pushed to the repo.
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
tests:
# Do only release when CI succeeds.
uses: ./.github/workflows/workflow.yaml
release:
# Do only release when CI succeeds.
needs: [tests]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version number
id: get-version
run: set -x; echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
- name: Read section from CHANGELOG.md
id: extract-changelog
uses: sean0x42/markdown-extract@v2
with:
file: CHANGELOG.md
pattern: ${{ steps.get-version.outputs.version }}
- name: Prepare release notes and artifacts
run: |
.github/workflows/release_prep.sh ${{ env.GITHUB_REF_NAME }} > release_notes.txt
printf '${{ steps.extract-changelog.outputs.markdown }}' >> release_notes.txt
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
prerelease: true
# Use GH feature to populate the changelog automatically
generate_release_notes: true
body_path: release_notes.txt
fail_on_unmatched_files: true
files: rules_nixpkgs*-*.tar.gz