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(release): setup the GITHUB_TOKEN environment variable #525

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Changes from all 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
9 changes: 8 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ jobs:

- name: Release
id: release
env:
GITHUB_TOKEN: ${{ github.token }}
working-directory: .github/
run: |
npx --no-install semantic-release --ci
Expand All @@ -74,7 +76,6 @@ jobs:
TAG_NAME: ${{ needs.release-perform.outputs.release-tag }}
ASSETS_DIR: ${{ github.workspace }}/assets
SIGNATURES_DIR: ${{ github.workspace }}/signatures
GH_TOKEN: ${{ github.token }}

steps:
- name: Harden runner
Expand Down Expand Up @@ -107,12 +108,16 @@ jobs:
echo "The provided tag name '${TAG_NAME}' is valid"

- name: Download release assets
env:
GITHUB_TOKEN: ${{ github.token }}
run: gh release download "${TAG_NAME}" --dir "${ASSETS_DIR}"

- name: Install Cosign
uses: sigstore/cosign-installer@9614fae9e5c5eddabb09f90a270fcb487c9f7149 # v3.3.0

- name: Sign blob files
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
mkdir --parents "${SIGNATURES_DIR}"

Expand Down Expand Up @@ -190,6 +195,8 @@ jobs:
done

- name: Upload signature assets in release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
if [[ -z "$(ls --almost-all "${SIGNATURES_DIR}" 2>/dev/null)" ]]; then
echo 'No asset to be uploaded in the GitHub release'
Expand Down
Loading