pulumi/.github/workflows/on-release.yml

47 lines
1.2 KiB
YAML

name: Release
permissions:
# To create the follow-up PR.
contents: write
pull-requests: write
on:
release:
types:
- released
concurrency: release
jobs:
info:
name: gather
runs-on: ubuntu-latest
outputs:
version: "${{ fromJSON(steps.version.outputs.version) }}"
next-version: "${{ fromJSON(steps.version.outputs.next-version) }}"
steps:
- uses: actions/checkout@v3
# Uses release ref (tag)
- name: Info
id: version
run: |
TAG="${{ github.event.release.tag_name }}"
PULUMI_VERSION="${TAG#v}" # remove prefix
./.github/scripts/set-output version "${PULUMI_VERSION}"
NEXT_VERSION="$(.github/scripts/get-next-version "${PULUMI_VERSION}")"
./.github/scripts/set-output next-version "${NEXT_VERSION}"
release:
name: release
needs: [info]
uses: ./.github/workflows/release.yml
with:
ref: ${{ github.event.release.tag_name }}
version: ${{ needs.info.outputs.version }}
next-version: ${{ needs.info.outputs.next-version }}
release-notes: ${{ github.event.release.body }}
run-dispatch-commands: true
secrets: inherit