Merge pull request #293 from Bedrock-OSS/develop #82
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: goreleaser | |
on: | |
push: | |
tags: | |
- '*' | |
permissions: | |
contents: write | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
goreleaser: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- name: Cache Wix Toolset | |
id: cache-wix | |
uses: actions/cache@v3 | |
with: | |
path: C:/wix | |
key: wix | |
- name: Set up Wix Toolset | |
if: steps.cache-wix.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p C:/wix | |
curl -o "C:/wix/wix311-binaries.zip" -OL https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip | |
unzip C:/wix/wix311-binaries.zip -d "C:/wix" | |
echo "C:\wix" >> $GITHUB_PATH | |
go install github.com/stirante/go-msi@latest | |
mkdir ./go-msi-tmp | |
shell: bash | |
- name: Sync vendor directory | |
run: | | |
go mod vendor | |
shell: bash | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v3 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
- uses: actions/checkout@v2 | |
with: | |
repository: 'Bedrock-OSS/regolith-action' | |
token: ${{ secrets.GH_PAT }} | |
path: './action' | |
- name: Update GitHub Action | |
working-directory: './action' | |
run: | | |
echo -n "${{github.ref_name}}" > version | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add ./version | |
git commit -m "Regolith v${{github.ref_name}}" | |
git tag "v${{github.ref_name}}" | |
git push origin main | |
git push --tags |