Update go and modules #65
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 | |
on: | |
push: | |
tags: | |
- '*' | |
permissions: | |
contents: write | |
jobs: | |
goreleaser: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.21 | |
cache: true | |
- name: Set up Wix Toolset | |
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 --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v2 | |
with: | |
repository: 'MCDevKit/cmcc-docs' | |
token: ${{ secrets.GH_PAT }} | |
path: './docs' | |
- name: Push docs | |
working-directory: './docs' | |
run: | | |
cd json-templating-engine | |
../../dist/win_binary_windows_amd64_v1/jsonte.exe docgen | |
cd .. | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add ./json-templating-engine/* | |
git commit -m "JSON Templating Engine v${{github.ref_name}}" | |
git push origin github_pages | |
- uses: actions/checkout@v2 | |
with: | |
repository: 'MCDevKit/regolith-library' | |
token: ${{ secrets.GH_PAT }} | |
path: './regolith-library' | |
- name: Copy artifacts | |
working-directory: './regolith-library' | |
run: | | |
cp ../dist/win_binary_windows_amd64_v1/jsonte.exe ./jsonte/ | |
cp ../dist/binary_linux_amd64_v1/jsonte ./jsonte/jsonte-linux | |
cp ../dist/binary_darwin_amd64_v1/jsonte ./jsonte/jsonte-mac | |
chmod +x ./jsonte/jsonte-linux | |
chmod +x ./jsonte/jsonte-mac | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add ./jsonte/jsonte.exe | |
git add ./jsonte/jsonte-linux | |
git add ./jsonte/jsonte-mac | |
git commit -m "JSON Templating Engine v${{github.ref_name}}" | |
git push origin main | |
git tag jsonte-${{ github.ref_name }} | |
git push --tags |