Skip to content

Bump actions/checkout from 3.5.0 to 4.1.0 #56

Bump actions/checkout from 3.5.0 to 4.1.0

Bump actions/checkout from 3.5.0 to 4.1.0 #56

Workflow file for this run

name: release
on:
pull_request:
paths:
- .github/workflows/release.yml
push:
tags:
- 'release/*'
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/release/* ]]; then
( echo version="${ref##refs/tags/release/}"
echo publish=true
) >> "$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:v39-rust
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- run: just fetch
- run: just test-build
- run: just 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:v39-rust
steps:
- if: needs.meta.outputs.publish
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- if: needs.meta.outputs.publish
shell: bash
run: |
just-cargo fetch
crate=$(just-cargo crate-version k8s-gateway-api)
tag="${{ needs.meta.outputs.version }}"
if [[ "$crate" != "$tag" ]]; then
echo "::error ::Crate version ${crate} does not match tag ${tag}"
exit 1
fi
- if: needs.meta.outputs.publish
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
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:v39-rust
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- if: needs.meta.outputs.publish == ''
run: just publish --dry-run
- if: needs.meta.outputs.publish == 'true'
run: just publish --token=${{ secrets.CRATESIO_TOKEN }}