Publish Release #112
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: Publish Release | |
# Every time we trigger the workflow on a branch. | |
on: | |
workflow_dispatch: | |
jobs: | |
generate_version_name: | |
runs-on: ubuntu-latest | |
outputs: | |
version_name: ${{ steps.version_name.outputs.PROJECT_VERSION }} | |
steps: | |
- uses: actions/checkout@v4 | |
# Get the version name from a script and save it in version_name output. | |
- name: Generate version_name | |
id: version_name | |
run: | | |
echo "▸ Set run permission." | |
chmod +x scripts/version_name.sh | |
echo "▸ Getting version name" | |
PROJECT_VERSION=$(./scripts/version_name.sh) | |
echo "▸ Creating the version_name output with value: $PROJECT_VERSION" | |
echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_OUTPUT | |
echo "▸ DONE" | |
create_github_release: | |
runs-on: ubuntu-latest | |
needs: generate_version_name | |
steps: | |
- uses: actions/checkout@v4 | |
# Create a Github release with release notes. | |
- name: Create Github release | |
uses: ncipollo/release-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VERSION_NAME: ${{ needs.generate_version_name.outputs.version_name }} | |
with: | |
token: ${{ env.GITHUB_TOKEN }} | |
tag: ${{ env.VERSION_NAME }} | |
name: ${{ env.VERSION_NAME }} | |
bodyFile: ${{ github.workspace }}/RELEASE_NOTES.md | |
draft: true |