Merge pull request #708 from nokia/moosq-patch-1 #48
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
name: Release with goreleaser | |
on: | |
push: | |
tags: | |
- v*.* | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Unshallow Fetch | |
run: git fetch --prune --unshallow | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.16' | |
- name: Release via goreleaser | |
uses: goreleaser/goreleaser-action@master | |
with: | |
args: release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
msi: | |
needs: goreleaser | |
runs-on: windows-latest | |
steps: | |
- name: Support longpaths | |
run: git config --system core.longpaths true | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Download ntt.exe | |
id: download_exe | |
shell: bash | |
run: | | |
hub release download "${GITHUB_REF#refs/tags/}" -i ntt_windows_x86_64.tar.gz | |
printf "::set-output name=zip::%s\n" *.tar.gz | |
tar xzf ntt_windows_x86_64.tar.gz && rm ntt_windows_x86_64.tar.gz | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Install go-msi | |
run: choco install -y "go-msi" | |
- name: Prepare PATH | |
shell: bash | |
run: | | |
echo "$WIX\\bin" >> $GITHUB_PATH | |
echo "C:\\Program Files\\go-msi" >> $GITHUB_PATH | |
- name: Build MSI | |
id: buildmsi | |
shell: bash | |
run: | | |
mkdir -p build | |
go-msi make --msi "$PWD/ntt.msi" --out "$PWD/build" --version "${GITHUB_REF#refs/tags/}" | |
printf "::set-output name=msi::%s\n" *.msi | |
- name: Upload MSI | |
shell: bash | |
run: hub release edit "${GITHUB_REF#refs/tags/}" -m "" --draft=true -a "${{ steps.buildmsi.outputs.msi }}" | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |