Release #315
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: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
dry_run: | |
type: boolean | |
description: 'Dry run. Compute release version only' | |
default: false | |
run_integration_tests: | |
type: boolean | |
description: 'Run integration tests' | |
default: true | |
jobs: | |
version: | |
name: Compute release version | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.dryrun.outputs.release-version }} | |
tag: ${{ steps.dryrun.outputs.release-channel == 'main' && 'latest' || steps.dryrun.outputs.release-channel }} | |
permissions: | |
contents: write | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: dryrun | |
id: dryrun | |
uses: ahmadnassri/action-semantic-release@v2 | |
with: | |
config: ${{ github.workspace }}/.releaserc.json | |
dry: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
push: | |
needs: version | |
if: ${{ !inputs.dry_run && needs.version.outputs.version != '' }} | |
uses: ./.github/workflows/push.yaml | |
secrets: inherit | |
with: | |
run_integration_tests: ${{ inputs.run_integration_tests }} | |
release_version: ${{ needs.version.outputs.version }} | |
publish: | |
needs: [version, push] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Tag release | |
id: build | |
if: ${{ needs.version.outputs.tag != '' }} | |
run: | | |
make tag | |
env: | |
MAKEFLAGS: "-j 4 --output-sync=target" | |
S3_BUCKET_PREFIX: "observeinc-" | |
RELEASE_VERSION: "${{ needs.version.outputs.version }}" | |
TAG: ${{ needs.version.outputs.tag }} | |
- name: Cut release | |
id: release | |
uses: ahmadnassri/action-semantic-release@v2 | |
with: | |
config: ${{ github.workspace }}/.releaserc.json | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Delete older pre-releases | |
uses: dev-drprasad/delete-older-releases@v0.3.4 | |
with: | |
keep_latest: 0 | |
delete_tags: true | |
delete_prerelease_only: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |