Invest endpoint loan retrieval fix (#1606) #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# release workflow gets triggered when a tag is pushed | |
# build job builds artifacts on different os and uploads them to a temporary location | |
# release job pulls the artifacts down, creates a changelog and creates a new draft release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
name: Release | |
jobs: | |
build: | |
strategy: | |
matrix: | |
go-version: [1.18.x] | |
os: [ubuntu-latest, macos-latest] | |
arch: [amd64] | |
runs-on: ${{ matrix.os }} | |
env: | |
GOPATH: ${{ github.workspace }} | |
defaults: | |
run: | |
working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Check out code | |
uses: actions/checkout@v2 | |
with: | |
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} | |
fetch-depth: 0 | |
- uses: actions/[email protected] | |
with: | |
path: ${{ env.GOPATH }}/pkg/mod | |
key: ${{ runner.os }}-go-${{ github.job }}-${{ matrix.arch }} | |
- name: Build ${{ matrix.os }}-${{ matrix.arch }} binary | |
run: arch=${{ matrix.arch }} make build-binary | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ github.sha }}-artifacts | |
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}/*.tar.gz | |
if-no-files-found: error | |
release: | |
needs: build | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
runs-on: ${{ matrix.os }} | |
env: | |
GOPATH: ${{ github.workspace }} | |
defaults: | |
run: | |
working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
with: | |
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} | |
fetch-depth: 0 | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: ${{ github.sha }}-artifacts | |
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} | |
- name: Downloaded artifacts | |
run: ls -R *.tar.gz | |
- name: Generate changelog | |
id: changelog-generator | |
uses: vedhavyas/[email protected] | |
with: | |
commit-template: '- {hash} → {title}' | |
template: | | |
### Changelog | |
{commits} | |
{range} | |
❤ | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: ${{ steps.changelog-generator.outputs.changelog }} | |
files: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}/*.tar.gz | |
draft: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |