rm obsolete todos #3
Workflow file for this run
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: Release | ||
run-name: Release version ${{ github.event.inputs.version }} | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Version to release" | ||
required: true | ||
permissions: | ||
contents: write | ||
env: | ||
BINARY_VERSION: ${{ github.event.inputs.version }} | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Configure git | ||
run: | | ||
git config --global user.name '${{ github.actor }}' | ||
git config --global user.email '${{ github.actor }}@users.noreply.github.com' | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Check version format | ||
run: | | ||
bin/check-version.pl | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: "./go.mod" | ||
- name: Build | ||
run: | | ||
bin/build-binaries.sh | ||
- name: Tag | ||
run: | | ||
git tag -a v${{ env.BINARY_VERSION }} -m "Release version ${{ env.BINARY_VERSION }}" | ||
git push origin --tags | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
out/* | ||
tag_name: ${{ env.BINARY_VERSION }} | ||
publish-to-npm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: "Setup Node" | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: "./.nvmrc" | ||
cache: npm | ||
- name: Download release files | ||
run: | | ||
gh release download ${{ github.event.inputs.version }} --dir out | ||
- run: bin/build-npm-packages.sh | ||
- name "Setup npm" | ||
run: "npm config set -- '//registry.npmjs.org/:_authToken' '${{ secrets.NPM_RELEASE_TOKEN }}'" | ||
- run: bin/publish-npm-packages.sh |