Skip to content

Merge pull request #71 from hookdeck/chore/bump-npm #49

Merge pull request #71 from hookdeck/chore/bump-npm

Merge pull request #71 from hookdeck/chore/bump-npm #49

Workflow file for this run

name: release
on:
push:
tags:
- "v*"
jobs:
build-mac:
runs-on: macos-latest
steps:
- name: Code checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18.1
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release -f .goreleaser/mac.yml --clean
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
build-linux:
runs-on: ubuntu-latest
env:
# https://goreleaser.com/customization/docker_manifest/
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- name: Code checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Docker Login
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
- name: Set up Docker QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18.1
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release -f .goreleaser/linux.yml --clean
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
build-windows:
runs-on: windows-latest
steps:
- name: Code checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18.1
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release -f .goreleaser/windows.yml --clean
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
build-windows-npm:
runs-on: windows-latest
steps:
- name: Code checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18.1
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release -f .goreleaser/windows-npm.yml --clean
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
publish-npm:
runs-on: ubuntu-latest
needs: [build-windows-npm, build-linux, build-mac]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}