Merge pull request #711 from nokia/moosq-patch-3 #51
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}} |