Skip to content

Commit

Permalink
handle publishes on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
l3uddz committed Mar 29, 2020
1 parent 456c811 commit 2c97f98
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
shell: bash
steps:
# dependencies
- name: dependencies
Expand Down Expand Up @@ -51,9 +52,16 @@ jobs:
# build
- name: build
if: !startsWith(github.ref, 'refs/tags/')
run: |
make snapshot
# publish
- name: publish
if: startsWith(github.ref, 'refs/tags/')
run: |
make publish
# artifacts
- name: artifact_linux
uses: actions/upload-artifact@v2-preview
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ release: fetch ## Generate a release, but don't publish
.PHONY: publish
publish: fetch ## Generate a release, and publish
docker run --rm --privileged \
-e GITHUB_TOKEN="${GITHUB_TOKEN}" \
-e VERSION="${VERSION}" \
-e GIT_COMMIT="${GIT_COMMIT}" \
-e TIMESTAMP="${TIMESTAMP}" \
Expand Down

0 comments on commit 2c97f98

Please sign in to comment.