66permissions :
77 contents : write
88jobs :
9- release :
10- name : Release
9+ build :
10+ name : Build (${{ matrix.platform.os }}-${{ matrix.platform.arch }})
1111 runs-on : ubuntu-latest
1212 strategy :
1313 matrix :
14- # Define all platforms to build for
1514 platform :
1615 - {os: 'linux', arch: 'amd64'}
1716 - {os: 'linux', arch: 'arm64'}
2524 uses : actions/setup-go@v5
2625 with :
2726 go-version : ' 1.23'
27+ cache-dependency-path : src/mcp/go.sum
2828
2929 - name : Generate commands
3030 run : ./build.sh
@@ -36,31 +36,38 @@ jobs:
3636 run : |
3737 cd src/mcp
3838 go build -o "../../dist/quint-mcp" -trimpath
39- cd ../..
4039
4140 - name : Create release package
4241 run : |
43- # Create a directory for the package contents
4442 mkdir -p "package/bin"
4543 mkdir -p "package/commands"
46-
47- # Move the binary into the package
4844 mv "dist/quint-mcp" "package/bin/quint-mcp"
49-
50- # Copy generated commands
5145 cp -r dist/* package/commands/
52-
53- # Create the archive
54- export TAG=${GITHUB_REF_NAME#v}
55- export ASSET_NAME="quint-code-${TAG}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz"
46+ TAG=${GITHUB_REF_NAME#v}
47+ ASSET_NAME="quint-code-${TAG}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz"
5648 tar -czf "$ASSET_NAME" -C "package" .
5749 echo "ASSET_NAME=${ASSET_NAME}" >> $GITHUB_ENV
5850
59- - name : Upload Release Asset
51+ - name : Upload artifact
52+ uses : actions/upload-artifact@v4
53+ with :
54+ name : quint-code-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
55+ path : ${{ env.ASSET_NAME }}
56+
57+ release :
58+ name : Release
59+ needs : build
60+ runs-on : ubuntu-latest
61+ steps :
62+ - name : Download all artifacts
63+ uses : actions/download-artifact@v4
64+ with :
65+ path : artifacts
66+
67+ - name : Create Release
6068 uses : softprops/action-gh-release@v2
61- if : startsWith(github.ref, 'refs/tags/')
6269 with :
63- files : ${{ env.ASSET_NAME }}
70+ files : artifacts/**/*.tar.gz
6471 draft : false
6572 prerelease : false
66- generate_release_notes : true
73+ generate_release_notes : true
0 commit comments