Repository navigation
49 lines (42 loc) · 1.48 KB
/
Copy pathrelease.yml
File metadata and controls
49 lines (42 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build & Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
name: Build & Release ${{ github.event.release.tag_name }}
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
registry-url: https://registry.npmjs.org
- name: Build binaries
uses: codeshelldev/gh-actions/go-build@v1.0.3
with:
platforms: linux/amd64,linux/arm64,darwin/amd64,windows/amd64
output-pattern: dist/goplater-${{ github.event.release.tag_name }}-{os}-{arch}
build-args: |
Version=${{ github.event.release.tag_name }}
Commit=${{ github.sha }}
- name: Attach to release
uses: codeshelldev/gh-actions/gh-releaser@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag-name: ${{ github.event.release.tag_name }}
input-pattern: dist/{name}-${{ github.event.release.tag_name }}-{os}-{arch}
output-pattern: "{name}-${{ github.event.release.tag_name }}-{os}-{arch}"
- name: Publish npm package
run: |
cp -r dist/* npm/bin/
chmod +x -R npm/bin/
cp README.md npm/
cp LICENSE npm/
cd npm/
npm version ${{ github.event.release.tag_name }} --no-git-tag-version
npm stage publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_PCKG_TOKEN }}