v2.3.0 #24
Workflow file for this run
This file contains hidden or 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: Post Release | |
on: | |
# Triggered manually | |
workflow_dispatch: | |
inputs: | |
versionNumber: | |
required: true | |
type: string | |
description: "If running this manually please insert a version number that corresponds to the latest published in the GitHub releases (i.e. v1.1.1)" | |
# Or triggered as result of a release | |
release: | |
types: [released] | |
permissions: | |
contents: read | |
jobs: | |
post_release: | |
permissions: | |
contents: read | |
issues: write | |
discussions: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
env: | |
RELEASE_VERSION: ${{ inputs.versionNumber }} | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Get release version | |
run: | | |
# The code below does the following: | |
# 1. If the workflow was triggered manually, it will use the version number provided by the user | |
# 2. If the workflow was triggered by a release, it will use the version number of the release | |
if [ -z "$RELEASE_VERSION" ]; then | |
export RELEASE_VERSION=$(git describe --tags --abbrev=0) | |
fi | |
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV | |
- name: Update issues related to release | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const post_release = require('.github/scripts/post_release.js') | |
await post_release({github, context, core}) |