Skip to content

Commit

Permalink
Add workflow for releasing assets
Browse files Browse the repository at this point in the history
  • Loading branch information
darkowlzz committed Oct 24, 2020
1 parent fc63af7 commit 167b63a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/upload-release-assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Upload release assets

on:
workflow_dispatch:
# Enable manual trigger of this action.
inputs:
tag:
description: Git tag to checkout.
required: true

jobs:
build-and-upload:
runs-on: ubuntu-latest
steps:
- name: Set tag name env var.
run: echo "REL_TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
ref: ${{ env.REL_TAG }}
- name: Build binaries
run: make release
- name: Prepare assets
run: |
mkdir -p release
cp bin/releases/${{ env.REL_TAG }}/amd64/ignite release/ignite-amd64
cp bin/releases/${{ env.REL_TAG }}/amd64/ignited release/ignited-amd64
cp bin/releases/${{ env.REL_TAG }}/arm64/ignite release/ignite-arm64
cp bin/releases/${{ env.REL_TAG }}/arm64/ignited release/ignited-arm64
- name: Upload assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
file: release/*
tag: ${{ env.REL_TAG }}
overwrite: true
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ local: # Do not use directly -- use $(GO_MAKE_TARGET)
$(COMMAND)
go-in-docker: # Do not use directly -- use $(GO_MAKE_TARGET)
mkdir -p $(CACHE_DIR)/go $(CACHE_DIR)/cache
$(DOCKER) run -it --rm \
$(DOCKER) run --rm \
-v $(CACHE_DIR)/go:/go \
-v $(CACHE_DIR)/cache:/.cache/go-build \
-v $(shell pwd):/go/src/${PROJECT} \
Expand Down Expand Up @@ -167,7 +167,7 @@ ifneq ($(IS_DIRTY),0)
endif
mkdir -p bin/releases/${GIT_VERSION}
cp -r bin/{amd64,arm64} bin/releases/${GIT_VERSION}
DOCKER=$(DOCKER) hack/push-manifest-list.sh $(IMAGE):$(IMAGE_TAG) $(GOARCH_LIST)
# DOCKER=$(DOCKER) hack/push-manifest-list.sh $(IMAGE):$(IMAGE_TAG) $(GOARCH_LIST)

tidy: /go/bin/goimports
go mod tidy
Expand Down

0 comments on commit 167b63a

Please sign in to comment.