fix: set GH_TOKEN
when adding artifact to release
#221
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] | |
workflow_dispatch: | |
inputs: | |
release: | |
description: 'type "release" to create the release (main branch only)' | |
required: false | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
dryrun: | |
if: ${{ github.ref != 'refs/heads/main' || github.event.inputs.release != 'release' }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
issues: read | |
pull-requests: read | |
steps: | |
- name: 🏗 Setup repo | |
uses: actions/checkout@v4 | |
- name: 🏗 Setup project | |
uses: ./.github/actions/setup-project | |
- name: 📋 Dry-running release | |
run: npx semantic-release --dry-run | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
create: | |
if: ${{ github.ref == 'refs/heads/main' && github.event.inputs.release == 'release' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🏗 Setup repo | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.EXPOBOT_GITHUB_TOKEN }} | |
- name: 🏗 Setup project | |
uses: ./.github/actions/setup-project | |
- name: 📋 Release code | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.EXPOBOT_GITHUB_TOKEN }} | |
GIT_AUTHOR_NAME: Expo CI | |
GIT_AUTHOR_EMAIL: [email protected] | |
GIT_COMMITTER_NAME: Expo CI | |
GIT_COMMITTER_EMAIL: [email protected] |