Skip to content

feat(sprig): updated sprig version to advance functions support (#60) #34

feat(sprig): updated sprig version to advance functions support (#60)

feat(sprig): updated sprig version to advance functions support (#60) #34

Workflow file for this run

on:
push:
tags:
- '*.*.*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Upload Release Asset
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
id: go
- name: Cache Build Dependencies # Speeds up subsquent builds
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: go-${{ hashFiles('**/go.sum') }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Download private dependencies
run: |
git config --global url."https://${GITHUB_TOKEN}:[email protected]/".insteadOf "https://github.com/"
GOPRIVATE=github.com/armory-io/dinghy go get github.com/armory-io/dinghy/pkg/parsers/yaml@master
go mod vendor
env:
GITHUB_TOKEN: ${{ secrets.ARMORYIO_GITHUB_TOKEN }}
- name: Build
run: |
GOOS=windows GOARCH=amd64 go build -o arm-${{ steps.get_version.outputs.VERSION }}-windows-amd64.exe main.go
zip -r arm-${{ steps.get_version.outputs.VERSION }}-windows-amd64.zip ./examples arm-${{ steps.get_version.outputs.VERSION }}-windows-amd64.exe ./docs README.md
GOOS=linux GOARCH=amd64 go build -o arm-${{ steps.get_version.outputs.VERSION }}-linux-amd64 main.go
zip -r arm-${{ steps.get_version.outputs.VERSION }}-linux-amd64.zip ./examples arm-${{ steps.get_version.outputs.VERSION }}-linux-amd64 ./docs README.md
GOOS=darwin GOARCH=amd64 go build -o arm-${{ steps.get_version.outputs.VERSION }}-darwin-amd64 main.go
zip -r arm-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.zip ./examples arm-${{ steps.get_version.outputs.VERSION }}-darwin-amd64 ./docs README.md
GOOS=darwin GOARCH=arm64 go build -o arm-${{ steps.get_version.outputs.VERSION }}-darwin-arm64 main.go
zip -r arm-${{ steps.get_version.outputs.VERSION }}-darwin-arm64.zip ./examples arm-${{ steps.get_version.outputs.VERSION }}-darwin-arm64 ./docs README.md
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
release_name: Release ${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false
- name: Upload Linux Asset
id: upload-release-asset-linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: arm-${{ steps.get_version.outputs.VERSION }}-linux-amd64.zip
asset_name: arm-${{ steps.get_version.outputs.VERSION }}-linux-amd64.zip
asset_content_type: application/octet-stream
- name: Upload Windows Asset
id: upload-release-asset-windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: arm-${{ steps.get_version.outputs.VERSION }}-windows-amd64.zip
asset_name: arm-${{ steps.get_version.outputs.VERSION }}-windows-amd64.zip
asset_content_type: application/octet-stream
- name: Upload OSX Asset
id: upload-release-asset-osx
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: arm-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.zip
asset_name: arm-${{ steps.get_version.outputs.VERSION }}-osx-amd64.zip
asset_content_type: application/octet-stream
- name: Upload macOS arm64 Asset
id: upload-release-asset-macos
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: arm-${{ steps.get_version.outputs.VERSION }}-darwin-arm64.zip
asset_name: arm-${{ steps.get_version.outputs.VERSION }}-macos-arm64.zip
asset_content_type: application/octet-stream