Skip to content

fix: fix weekly tag to use +%G.%-V instead of +%G.%V #213

fix: fix weekly tag to use +%G.%-V instead of +%G.%V

fix: fix weekly tag to use +%G.%-V instead of +%G.%V #213

name: Build Release Artifacts
on:
workflow_dispatch:
push:
branches: ["main", "staging"]
workflow_call:
outputs:
linux:
description: "Linux and MacOS binaries"
value: ${{jobs.build.outputs.artifact}}
concurrency:
# Cancel previous actions from the same PR or branch except 'main' branch.
# See https://docs.github.com/en/actions/using-jobs/using-concurrency and https://docs.github.com/en/actions/learn-github-actions/contexts for more info.
group: concurrency-group::${{ github.workflow }}::${{ github.event.pull_request.number > 0 && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}${{ github.ref_name == 'main' && format('::{0}', github.run_id) || ''}}
cancel-in-progress: ${{ github.ref_name != 'main' }}
permissions:
id-token: write
attestations: write
contents: write
jobs:
build:
name: Build MacOS and Linux release artifacts
runs-on: ubuntu-22.04-32core
outputs:
artifact: ${{steps.upload.outputs.artifact-url}}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # need to see tags (https://github.com/actions/checkout?tab=readme-ov-file#fetch-all-history-for-all-tags-and-branches)
- name: Setup bazelisk
run: |
sudo curl -fssL https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-linux-amd64 -o /usr/bin/bazel &&
sudo chmod +x /usr/bin/bazel
- name: Setup bazel
uses: bazel-contrib/setup-bazel@0.15.0
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: true
# Share repository cache between workflows.
repository-cache: true
- name: Build release artifacts
run: |
mkdir -p upload_root/assets
bazel run --config=release --config=ci //crates/aspect-launcher:release -- "${PWD}/upload_root/assets"
bazel run --config=release --config=ci //crates/aspect-cli:release -- "${PWD}/upload_root/assets"
- name: Attest build provenance
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
with:
subject-path: "upload_root/assets/*"
- name: Upload release artifacts
uses: actions/upload-artifact@v4
with:
path: upload_root/
retention-days: 1