Skip to content

Release Cross-build environment #6

Release Cross-build environment

Release Cross-build environment #6

Workflow file for this run

name: Release Cross-build environment
on:
schedule:
# Run at 00:00 UTC on the 1st, 10th, and 20th of every month
- cron: '0 0 1,10,20 * *'
workflow_dispatch:
inputs:
release_version:
description: 'The version to release'
required: true
concurrency:
group: release-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
uses: ./.github/workflows/build-xbuildenv.yml
publish:
runs-on: ubuntu-latest
needs: [build]
if: >-
github.repository == 'pyodide/pyodide-build-environment-nightly'
permissions:
# Required to sign the attestations
id-token: write
attestations: write
# Required to upload to a GitHub release identifier
contents: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: cross-build-env
path: dist
merge-multiple: true
- name: Generate attestations
uses: actions/attest-build-provenance@7668571508540a607bdfd90a87a560489fe372eb # v2.1.0
with:
subject-path: |
dist/xbuildenv.tar.bz2
- name: Calc release version
id: release_version
shell: bash
run: |
if [[ ${{ github.event_name }} == 'schedule' ]]; then
echo "release_version=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
else
echo "release_version=${{ github.event.inputs.release_version }}" >> $GITHUB_OUTPUT
fi
cat $GITHUB_OUTPUT
- name: Verify them, to ensure that the wheels they were attested correctly
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
gh attestation verify dist/xbuildenv.tar.bz2 --repo ${{ github.repository }}
- name: Create and push tag
run: |
git config --global user.name "Pyodide CI"
git config --global user.email "[email protected]"
TAG_NAME=${{ steps.release_version.outputs.release_version }}
git tag $TAG_NAME
git push origin $TAG_NAME
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub release with these wheels
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0
with:
files: |
dist/*.tar.bz2
tag_name: ${{ steps.release_version.outputs.release_version }}
fail_on_unmatched_files: true
name: ${{ steps.release_version.outputs.release_version }}