Skip to content

Merge pull request #290 from Bedrock-OSS/update-export-targets #81

Merge pull request #290 from Bedrock-OSS/update-export-targets

Merge pull request #290 from Bedrock-OSS/update-export-targets #81

Workflow file for this run

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 github-actions@github.com
git add ./version
git commit -m "Regolith v${{github.ref_name}}"
git tag "v${{github.ref_name}}"
git push origin main
git push --tags