Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: support provenance #1489

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
permissions:
# Needed to write the release changelog
contents: write
# Needed to the provenance generation
id-token: write
services:
verdaccio:
image: verdaccio/verdaccio:5
Expand Down Expand Up @@ -87,6 +89,8 @@ jobs:
- name: Publish the release
env:
DRY_RUN: "${{ inputs.dry-run }}"
# See https://github.com/lerna/lerna/issues/3657
NPM_CONFIG_PROVENANCE: true
run: npm run ci:release

- name: Read GCE vault secrets
Expand All @@ -109,8 +113,13 @@ jobs:
name: 'Prepare CDN release'
run: echo "versions=$(npm run --silent ci:prepare-release)" >> ${GITHUB_OUTPUT}

- name: generate build provenance
v1v marked this conversation as resolved.
Show resolved Hide resolved
uses: github-early-access/generate-build-provenance@main
with:
subject-path: "${{ github.workspace }}/packages/rum/dist/bundles/*.js"

- id: 'upload-files-version'
if: ${{ always() && hashFiles('packages/rum/dist/bundles/*.js') }}
if: ${{ always() && hashFiles('packages/rum/dist/bundles/*.js') && inputs.dry-run == false }}
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
parent: false
Expand All @@ -122,7 +131,7 @@ jobs:
cache-control: public,max-age=31536000,immutable

- id: 'upload-files-major-version'
if: ${{ always() && hashFiles('packages/rum/dist/bundles/*.js') }}
if: ${{ always() && hashFiles('packages/rum/dist/bundles/*.js') && inputs.dry-run == false }}
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
parent: false
Expand All @@ -134,7 +143,7 @@ jobs:
cache-control: public,max-age=604800,immutable

- id: 'upload-file-index'
if: ${{ always() && hashFiles('index.html') }}
if: ${{ always() && hashFiles('index.html') && inputs.dry-run == false }}
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
parent: false
Expand Down
Loading
Loading