Skip to content

Commit

Permalink
build: add workflow to prepare a release
Browse files Browse the repository at this point in the history
  • Loading branch information
gamemaker1 committed Jun 7, 2024
1 parent 4f51c2e commit 0b7105f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# /.github/workflows/ci.yaml
# GitHub actions workflow
# GitHub actions workflow to run tests on each commit, and publish new tags.

name: CI

Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# /.github/workflows/release.yaml
# GitHub actions workflow to prepare a release.

name: Release

on:
workflow_dispatch:
inputs:
version:
description: |
The new version to bump the package to; any value accepted by the
`npm version` command.
default: 'patch'

jobs:
prepare-release:
name: Prepare Release
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://registry.npmjs.org/
- name: Bump version
run: npm version "${{ github.event.inputs.version }}"
- name: Upload git tags
run: |
git push
git push --tags

0 comments on commit 0b7105f

Please sign in to comment.