v10.9.4-202512181017 #38
Workflow file for this run
This file contains hidden or 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: Installer Release | |
| on: | |
| release: | |
| types: ['released'] | |
| jobs: | |
| setup_deployment: | |
| name: Validate & Setup | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| version_major: ${{ steps.validate.outputs.version_major }} | |
| version: ${{ steps.validate.outputs.version }} | |
| steps: | |
| - name: Validate Release Version | |
| id: validate | |
| run: | | |
| VERSION="${{ github.event.release.tag_name }}" | |
| echo "Validating release: $VERSION" | |
| if [[ "$VERSION" =~ ^v10\.[0-9]+\.[0-9]+ ]]; then | |
| echo "✅ V10 release detected: $VERSION" | |
| echo "version_major=v10" >> $GITHUB_OUTPUT | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| elif [[ "$VERSION" =~ ^v11\.[0-9]+\.[0-9]+ ]]; then | |
| echo "✅ V11 release detected: $VERSION" | |
| echo "version_major=v11" >> $GITHUB_OUTPUT | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| else | |
| echo "⏭️ Skipping: Not a v10 or v11 release (got $VERSION)" | |
| fi | |
| build_v10: | |
| name: Build V10 Installer | |
| runs-on: ubuntu-24.04 | |
| needs: setup_deployment | |
| if: needs.setup_deployment.outputs.version_major == 'v10' | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ^1.20 | |
| id: go | |
| - name: Build | |
| working-directory: ./installer | |
| env: | |
| GOOS: linux | |
| GOARCH: amd64 | |
| run: go build -o installer -v . | |
| - name: Upload Release Assets | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| body_path: ./CHANGELOG.md | |
| draft: false | |
| prerelease: false | |
| files: | | |
| ./installer/installer | |
| build_v11: | |
| name: Build V11 Installer | |
| runs-on: ubuntu-24.04 | |
| needs: setup_deployment | |
| if: needs.setup_deployment.outputs.version_major == 'v11' | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ^1.20 | |
| id: go | |
| - name: Configure git for private modules | |
| run: | | |
| git config --global url."https://${{ secrets.API_SECRET }}:[email protected]/".insteadOf "https://github.com/" | |
| echo "GOPRIVATE=github.com/utmstack" >> $GITHUB_ENV | |
| echo "GONOPROXY=github.com/utmstack" >> $GITHUB_ENV | |
| echo "GONOSUMDB=github.com/utmstack" >> $GITHUB_ENV | |
| - name: Build | |
| working-directory: ./installer | |
| env: | |
| GOOS: linux | |
| GOARCH: amd64 | |
| GOPRIVATE: github.com/utmstack | |
| GONOPROXY: github.com/utmstack | |
| GONOSUMDB: github.com/utmstack | |
| run: | | |
| echo "Building V11 Installer for production release" | |
| go build -o installer -v -ldflags "\ | |
| -X 'github.com/utmstack/UTMStack/installer/config.DEFAULT_BRANCH=prod' \ | |
| -X 'github.com/utmstack/UTMStack/installer/config.INSTALLER_VERSION=${{ needs.setup_deployment.outputs.version }}' \ | |
| -X 'github.com/utmstack/UTMStack/installer/config.REPLACE=${{ secrets.CM_ENCRYPT_SALT }}' \ | |
| -X 'github.com/utmstack/UTMStack/installer/config.PUBLIC_KEY=${{ secrets.CM_SIGN_PUBLIC_KEY }}'" . | |
| - name: Upload Release Assets | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| body_path: ./CHANGELOG.md | |
| draft: false | |
| files: | | |
| ./installer/installer |