Create Release #11
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 Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version number (e.g., 1.0.0)' | |
required: true | |
type: string | |
prerelease: | |
description: 'Is this a pre-release?' | |
required: true | |
type: boolean | |
default: false | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
run: | | |
bun install | |
pip install -r requirements.txt | |
- name: Update version in files | |
run: bun run helpers/update-version.ts | |
env: | |
RELEASE_VERSION: ${{ github.event.inputs.version }} | |
- name: Commit version updates | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add package.json plugin.json | |
git commit -m "chore: bump version to ${{ github.event.inputs.version }}" | |
git push | |
- name: Build and create zip | |
run: python helpers/build_zip.py | |
env: | |
RELEASE_VERSION: ${{ github.event.inputs.version }} | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ github.event.inputs.version }} | |
name: Release ${{ github.event.inputs.version }} | |
draft: false | |
prerelease: ${{ github.event.inputs.prerelease }} | |
files: | | |
SteamDB-plugin-${{ github.event.inputs.version }}.zip | |
generate_release_notes: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |