Oneshot candidate release #4
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: Oneshot candidate release | |
on: | |
workflow_dispatch: | |
jobs: | |
tag_release: | |
name: "Tag candidate release" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checking out repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
token: ${{ secrets.WRITE_ACCESS_TOKEN }} | |
- name: Compute version | |
run: | | |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
package_version="$(printf '%(%Y%m%d)T.${{ github.run_number }}')" | |
tag_name="candidate-${package_version}" | |
echo "package_version=${package_version}" >> $GITHUB_ENV | |
echo "tag_name=${tag_name}" >> $GITHUB_ENV | |
- name: Updating candidate tag | |
run: | | |
git tag "${tag_name}" | |
- name: Pushing changes | |
uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df # v0.8.0 | |
with: | |
github_token: ${{ secrets.WRITE_ACCESS_TOKEN }} | |
branch: ${{ github.ref_name }} | |
tags: true | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.WRITE_ACCESS_TOKEN }} | |
with: | |
tag_name: ${{ env.tag_name }} | |
release_name: iree candidate ${{ env.tag_name }} | |
body: | | |
Automatic candidate release of iree. | |
draft: true | |
prerelease: true | |
- name: "Invoke workflow :: Build Release Packages" | |
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 | |
with: | |
workflow: Build Release Packages | |
token: ${{ secrets.WRITE_ACCESS_TOKEN }} | |
ref: "${{ env.tag_name }}" | |
inputs: '{"package_suffix": "", "package_version": "${{ env.package_version }}", "release_id": "${{ steps.create_release.outputs.id }}"}' |