Skip to content

Add missing GH_TOKEN environment variable #8

Add missing GH_TOKEN environment variable

Add missing GH_TOKEN environment variable #8

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 \