Skip to content

Commit c8e975d

Browse files
committed
Support tag releases
1 parent 135f8c8 commit c8e975d

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: build
2-
on: [push]
2+
on: [ push, create ]
33

44
jobs:
55
build:
@@ -42,6 +42,7 @@ jobs:
4242
GOARCH=amd64 GOOS=linux make && mv dist/dots{,-linux-amd64}
4343
4444
- name: Release latest master
45+
if: github.event_name == 'push'
4546
uses: marvinpinto/action-automatic-releases@latest
4647
with:
4748
repo_token: "${{ secrets.GITHUB_TOKEN }}"
@@ -53,3 +54,16 @@ jobs:
5354
${{ env.GO_WORKSPACE }}/dist/dots-linux-amd64
5455
${{ env.GO_WORKSPACE }}/dist/dots-macos-amd64
5556
${{ env.GO_WORKSPACE }}/dist/dots-windows-amd64.exe
57+
58+
- name: Release tagged version
59+
if: github.event_name == 'create'
60+
uses: marvinpinto/action-automatic-releases@latest
61+
with:
62+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
63+
automatic_release_tag: ${{ github.ref }}
64+
title: dots ${{ github.ref }}
65+
files: |
66+
${{ env.GO_WORKSPACE }}/scripts/bootstrap
67+
${{ env.GO_WORKSPACE }}/dist/dots-linux-amd64
68+
${{ env.GO_WORKSPACE }}/dist/dots-macos-amd64
69+
${{ env.GO_WORKSPACE }}/dist/dots-windows-amd64.exe

0 commit comments

Comments
 (0)