Skip to content

Commit

Permalink
Try on release
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmysawczuk committed Oct 27, 2020
1 parent 3a044e0 commit 78f4561
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Release new version
on:
push:
tags:
- v*
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -24,21 +23,12 @@ jobs:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o "tmpl-${{ steps.tag.outputs.tag }}-linux-amd64" -ldflags "-s -w $(cat /tmp/buildtags)" -mod=vendor .
CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -a -o "tmpl-${{ steps.tag.outputs.tag }}-linux-386" -ldflags "-s -w $(cat /tmp/buildtags)" -mod=vendor .
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -o "tmpl-${{ steps.tag.outputs.tag }}-darwin-amd64" -ldflags "-s -w $(cat /tmp/buildtags)" -mod=vendor .
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ steps.tag.outputs.tag }}
draft: true
- name: Upload build (linux, amd64)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./tmpl-${{ steps.tag.outputs.tag }}-linux-amd64
asset_name: tmpl-${{ steps.tag.outputs.tag }}-linux-amd64
asset_content_type: application/octet-stream
Expand All @@ -47,7 +37,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./tmpl-${{ steps.tag.outputs.tag }}-linux-386
asset_name: tmpl-${{ steps.tag.outputs.tag }}-linux-386
asset_content_type: application/octet-stream
Expand All @@ -56,7 +46,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./tmpl-${{ steps.tag.outputs.tag }}-darwin-amd64
asset_name: tmpl-${{ steps.tag.outputs.tag }}-darwin-amd64
asset_content_type: application/octet-stream

0 comments on commit 78f4561

Please sign in to comment.