Skip to content

Commit dc1f29d

Browse files
committed
wip
1 parent 862c1cd commit dc1f29d

1 file changed

Lines changed: 20 additions & 11 deletions

File tree

.github/workflows/go-build.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,26 @@ on:
66
- "*"
77

88
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out code
13+
uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- name: Setup env
17+
run: echo "VERSION=$(git describe --tags --always)" >> $GITHUB_ENV
18+
- name: Create Release
19+
id: create_release
20+
uses: actions/create-release@v1
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
23+
with:
24+
tag_name: ${{ env.VERSION }}
25+
release_name: Release ${{ env.VERSION }}
26+
draft: false
27+
prerelease: true
28+
929
build:
1030
name: Build
1131
runs-on: ubuntu-latest
@@ -41,17 +61,6 @@ jobs:
4161
run: |
4262
CGO_ENABLED=0 GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH}} go build -ldflags "-X github.com/iansinnott/browser-gopher/cmd.Version=${{ env.VERSION }}" -o ./dist/browser-gopher-${{ env.VERSION }}-${{ matrix.GOOS }}-${{ matrix.GOARCH }}
4363
44-
- name: Create Release
45-
id: create_release
46-
uses: actions/create-release@v1
47-
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
49-
with:
50-
tag_name: ${{ steps.get_version.outputs.VERSION }}
51-
release_name: Release ${{ steps.get_version.outputs.VERSION }}
52-
draft: false
53-
prerelease: true
54-
5564
- name: Upload Release Asset
5665
id: upload-release-asset
5766
uses: actions/upload-release-asset@v1

0 commit comments

Comments
 (0)