Skip to content

Release

Release #112

Workflow file for this run

name: Release
# This workflow is triggered manually
on:
workflow_dispatch:
inputs:
version_bump_type:
description: 'Version Bump Type (major, minor, patch)'
required: true
default: 'patch'
version_metadata_path:
description: 'Path to file containing Version string'
required: true
default: 'pkg/version/version.go'
jobs:
release:
name: Create Release Commit
runs-on: ubuntu-latest
# Service containers to run with `build` (Required for end-to-end testing)
steps:
- uses: actions/setup-go@v5
with:
go-version: '^1.22.1' # The Go version to download (if necessary) and use.
- uses: actions/setup-node@v4
with:
node-version: 21
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Bump version
id: bump_version
uses: packagrio/action-bumpr-go@master
with:
version_bump_type: ${{ github.event.inputs.version_bump_type }}
version_metadata_path: ${{ github.event.inputs.version_metadata_path }}
github_token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
- name: Generate JS Package
run: |
make build-js
cd js && npm version ${{ steps.bump_version.outputs.release_version }} --no-git-tag-version
- name: Commit Changes Locally
id: commit
uses: packagrio/action-releasr-go@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
with:
version_metadata_path: ${{ github.event.inputs.version_metadata_path }}
- name: Publish Release
id: publish
uses: packagrio/action-publishr-go@master
env:
# This is necessary in order to push a commit to the repo
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
- name: Publish JS Package
run: |
make publish-js
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}