Skip to content

fix: release things #14

fix: release things

fix: release things #14

Workflow file for this run

name: ReleaseThings
on:
push:
tags:
- v*
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
jobs:
publish_go_binaries:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --clean
env:
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
publish_npm_dependencies:
name: NPM Release Matrix
runs-on: ubuntu-latest
strategy:
matrix:
package:
[
"wasm",
"functions-runtime",
"testing-runtime",
"client-react",
"client-react-query",
]
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.20"
- uses: actions/setup-node@v3
with:
node-version: 18.12.1
token: ${{ secrets.NPM_TOKEN }}
- uses: pnpm/[email protected]
with:
version: 8.10.0
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{github.ref_name}}
fetch-depth: 0
- name: Install Go deps
run: go mod download
- name: Generate wasm binary
if: ${{ matrix.package == 'wasm' }}
run: make wasm
- name: Install ${{ matrix.package }} publish dependencies
working-directory: ./packages/${{ matrix.package }}
run: pnpm install --frozen-lockfile
- uses: mad9000/actions-find-and-replace-string@2
id: make_package_version
with:
source: ${{ github.ref_name }}
find: 'v'
replace: ''
- name: "Update NPM version ${{ matrix.package }}"
uses: reedyuk/[email protected]
with:
version: ${{ steps.make_package_version.outputs.value }}
package: ./packages/${{ matrix.package }}
- name: NPM Publish ${{ matrix.package }}
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
tag: prerelease
package: ./packages/${{ matrix.package }}
dry-run: true
strategy: all
ignore-scripts: false
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}