Skip to content

Commit 4151649

Browse files
authored
Merge pull request #378 from blinklabs-io/ci/publish
ci: publish workflow
2 parents 691e7ec + 4ecb6de commit 4151649

File tree

2 files changed

+40
-17
lines changed

2 files changed

+40
-17
lines changed

.github/workflows/publish-docs.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
concurrency: ${{ github.ref }}
9+
10+
jobs:
11+
create-release:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
RELEASE_ID: ${{ steps.create-release.outputs.result }}
15+
steps:
16+
- run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV"
17+
- uses: actions/github-script@v6
18+
id: create-release
19+
with:
20+
github-token: ${{ secrets.GITHUB_TOKEN }}
21+
result-encoding: string
22+
script: |
23+
try {
24+
const response = await github.rest.repos.createRelease({
25+
generate_release_notes: true,
26+
name: process.env.RELEASE_TAG,
27+
owner: context.repo.owner,
28+
prerelease: false,
29+
repo: context.repo.repo,
30+
tag_name: process.env.RELEASE_TAG,
31+
});
32+
33+
return response.data.id;
34+
} catch (error) {
35+
core.setFailed(error.message);
36+
}
37+
38+
# This updates the documentation on pkg.go.dev and the latest version available via the Go module proxy
39+
- name: Pull new module version
40+
uses: andrewslotin/[email protected]

0 commit comments

Comments
 (0)