Add missing GH_TOKEN
environment variable
#8
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: Create new pre-release | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set build version number | |
run: | | |
echo VERSION=$(cat VERSION).$GITHUB_RUN_NUMBER >> $GITHUB_ENV | |
- name: Create GitHub pre-release | |
run: | | |
gh api \ | |
--method POST \ | |
--header "Accept: application/vnd.github+json" \ | |
/repos/${GITHUB_REPOSITORY}/releases \ | |
-f tag_name='v${{ env.VERSION }}' \ | |
-f target_commitish='main' \ | |
-f name='${{ env.VERSION }}' \ | |
-F prerelease=true \ |