diff --git a/.VERSION b/.VERSION new file mode 100644 index 00000000..e69de29b diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 093852bd..7b1a2a90 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,11 +47,13 @@ jobs: go-version: ">=1.23.0" - name: 🔬 Check semantic versioning id: semantic-release + shell: bash run: | - GITHUB_REF=${{ github.head_ref }} - npx semantic-release --no-ci --dry-run --plugins @semantic-release/commit-analyzer --branches ${{ github.head_ref }} + GITHUB_REF=${{ github.head_ref || github.ref_name }} + npx semantic-release@21 --no-ci --dry-run --plugins @semantic-release/commit-analyzer --branches beta VERSION=$(cat .VERSION) - + env: + GITHUB_TOKEN: ${{ secrets.ROSIE_TOKEN }} - shell: bash run: | echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV @@ -61,15 +63,15 @@ jobs: run: | CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w -X 'github.com/open-amt-cloud-toolkit/console/internal/app.Version=$VERSION'" -trimpath -o dist/linux/console_linux_x64 ./cmd/app/main.go - - shell: bash + - shell: bash if: matrix.os == 'windows-latest' run: | - CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w -X 'github.com/open-amt-cloud-toolkit/console/internal/app.Version=$VERSION'" -trimpath -o dist/windows/console_windows_x64 ./cmd/app/main.go + CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w -X 'github.com/open-amt-cloud-toolkit/console/internal/app.Version=$VERSION'" -trimpath -o dist/windows/console_windows_x64.exe ./cmd/app/main.go - shell: bash if: matrix.os == 'macos-latest' run: | - CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w -X 'github.com/open-amt-cloud-toolkit/console/internal/app.Version=$VERSION'" -trimpath -o dist/farwin/console_mac_arm64 ./cmd/app/main.go + CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w -X 'github.com/open-amt-cloud-toolkit/console/internal/app.Version=$VERSION'" -trimpath -o dist/darwin/console_mac_arm64 ./cmd/app/main.go - uses: actions/cache@v4 if: matrix.os == 'ubuntu-latest' @@ -101,28 +103,31 @@ jobs: with: egress-policy: audit + - name: Checkout Console + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + # copy the caches from prepare - shell: bash run: | echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - - uses: actions/cache@v3.2.3 + - uses: actions/cache@v4 with: path: dist/linux key: linux-${{ env.sha_short }} - - uses: actions/cache@v3.2.3 + - uses: actions/cache@v4 with: path: dist/darwin key: darwin-${{ env.sha_short }} - - uses: actions/cache@v3.2.3 + - uses: actions/cache@v4 with: path: dist/windows key: windows-${{ env.sha_short }} enableCrossOsArchive: true - - - name: Checkout Console - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: false + - run: | + ls -l dist + ls -l - name: Check out Sample Web UI uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # master diff --git a/.releaserc.json b/.releaserc.json index f4825611..e7071251 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -17,7 +17,7 @@ { "assets": [ { - "path": "dist/linux/console_linux_x64.tar.gz", + "path": "console_linux_x64.tar.gz", "label": "Linux x64 Console Executable" }, { @@ -25,7 +25,7 @@ "label": "Windows x64 Console Executable" }, { - "path": "dist/darwin/console_mac_arm64.tar.gz", + "path": "console_mac_arm64.tar.gz", "label": "Mac arm64 Console Executable" } ]