ci: Update GITHUB_TOKEN
for semantic-release
(#68)
#66
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
outputs: | |
RELEASE_PUBLISHED: ${{ steps.semantic-release.outputs.RELEASE_PUBLISHED }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- uses: ./.github/actions/setup-python | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "lts/*" | |
- name: Release | |
id: semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} | |
PYPI_TOKEN: ${{ secrets.RAPIDSAI_PYPI_TOKEN }} | |
run: | | |
npm install | |
npx semantic-release | |
trigger-pipeline: | |
if: needs.release.outputs.RELEASE_PUBLISHED == 'true' | |
runs-on: ubuntu-latest | |
needs: release | |
steps: | |
- name: Trigger Pipeline | |
env: | |
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} | |
run: | | |
gh workflow run push.yaml \ | |
--field upstream_job="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \ | |
--field upstream_repository=dependency-file-generator \ | |
--repo rapidsai/ci-imgs \ | |
--ref main |