Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bump actions/attest-build-provenance from 2 to 3 (#13) #363

Bump actions/attest-build-provenance from 2 to 3 (#13)

Bump actions/attest-build-provenance from 2 to 3 (#13) #363

Workflow file for this run

name: release
on:
push:
tags:
- '**'
jobs:
build:
permissions:
actions: write
attestations: write
id-token: write
uses: ./.github/workflows/build.yml
with:
ref: ${{ github.ref_name }}
release:
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download Artifact
uses: actions/download-artifact@v5
with:
pattern: dartsdk-android-*-${{ github.ref_name }}
merge-multiple: true
- name: Release
run: |
gh release create ${{ github.ref_name }} dartsdk-android-*-release.tar.gz dartaotruntime_android_* gen_snapshot_android_* --repo ${{ github.repository }} --prerelease=${{ endsWith(github.ref_name, '.beta') || endsWith(github.ref_name, '.dev') }}
env:
GH_TOKEN: ${{ github.token }}
container:
needs: [release]
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Download Artifact
uses: actions/download-artifact@v5
with:
pattern: dartsdk-android-*-${{ github.ref_name }}
merge-multiple: true
- name: Docker Metadata
id: docker-metadata
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=edge
type=ref,event=branch
type=ref,event=pr
type=schedule
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/0.') }}
- name: Set up QEMU
run: docker run --privileged --rm registry.fedoraproject.org/fedora-minimal /bin/sh -c "microdnf install --assumeyes --nodocs --setopt=install_weak_deps=False qemu-user-static systemd-udev && mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc && /usr/lib/systemd/systemd-binfmt --unregister && /usr/lib/systemd/systemd-binfmt"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64,linux/riscv64
push: ${{ !endsWith(github.ref_name, '.beta') && !endsWith(github.ref_name, '.dev') }}
tags: ${{ steps.docker-metadata.outputs.tags }}
labels: ${{ steps.docker-metadata.outputs.labels }}