Skip to content

build(deps): bump softprops/action-gh-release from 2.0.9 to 2.1.0 #114

build(deps): bump softprops/action-gh-release from 2.0.9 to 2.1.0

build(deps): bump softprops/action-gh-release from 2.0.9 to 2.1.0 #114

Workflow file for this run

name: release
on:
pull_request:
paths:
- justfile
- .github/workflows/release.yml
push:
tags:
- 'v*'
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
permissions:
contents: read
jobs:
meta:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- id: meta
shell: bash
run: |
ref='${{ github.ref }}'
if [[ "$ref" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
echo publish=true >> "$GITHUB_OUTPUT"
echo version="${ref##refs/tags/}" >> "$GITHUB_OUTPUT"
else
sha=${{ github.sha }}
echo version="test-${sha:0:7}" >> "$GITHUB_OUTPUT"
fi
outputs:
publish: ${{ steps.meta.outputs.publish }}
version: ${{ steps.meta.outputs.version }}
test:
timeout-minutes: 5
runs-on: ubuntu-latest
container: docker://ghcr.io/linkerd/dev:v43-rust
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- run: just rs-fetch
- run: just rs-gen-check
- run: just rs-test-build
- run: just rs-test
# Publish a GitHub release with platform-specific static binaries.
release:
needs: [meta, test]
permissions:
contents: write
timeout-minutes: 5
runs-on: ubuntu-latest
container: docker://ghcr.io/linkerd/dev:v43-rust
steps:
- if: needs.meta.outputs.publish
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- if: needs.meta.outputs.publish
shell: bash
run: |
version=$(cargo metadata --format-version=1 | jq -r '.packages[] | select(.name == "linkerd2-proxy-api") | .version')
expected='${{ needs.meta.outputs.version }}'
if [[ "v${version}" != "$expected" ]]; then
echo "::error ::Crate version v${version} does not match tag $expected"
exit 1
fi
- if: needs.meta.outputs.publish
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974
with:
name: ${{ needs.meta.outputs.version }}
generate_release_notes: true
crate:
# Only publish the crate after the rest of the release succeeds.
needs: [meta, release]
timeout-minutes: 10
runs-on: ubuntu-latest
container: docker://ghcr.io/linkerd/dev:v43-rust
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- if: '!needs.meta.outputs.publish'
run: just rs-publish --dry-run
- if: needs.meta.outputs.publish
run: just rs-publish --token=${{ secrets.CRATESIO_TOKEN }}