diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d61a47c988..24a29e7cea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,48 +3,33 @@ on: push: tags: - "*" + branches: + - release-job jobs: publish: name: release runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v5 - with: - go-version: '1.22' - cache: false - - - name: Set env - shell: bash - run: | - echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV - echo "${{ github.workspace }}/bin" >> $GITHUB_PATH - - uses: actions/cache@v4 - with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - key: go-release-${{ hashFiles('**/go.sum') }} - restore-keys: go-release- - uses: actions/checkout@v4 with: fetch-depth: 0 - path: src/github.com/kubernetes-sigs/cri-tools - - run: | - make release-notes release + - uses: actions/setup-go@v5 + with: + go-version: '1.22' + - run: make release-notes release env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - working-directory: src/github.com/kubernetes-sigs/cri-tools - uses: ncipollo/release-action@v1 with: allowUpdates: true - artifacts: src/github.com/kubernetes-sigs/cri-tools/_output/releases/* - bodyFile: src/github.com/kubernetes-sigs/cri-tools/release-notes.md + artifacts: _output/releases/* + bodyFile: release-notes.md token: ${{ secrets.GH_TOKEN }} - uses: actions/upload-artifact@v4 with: name: release-notes - path: src/github.com/kubernetes-sigs/cri-tools/release-notes.md + path: release-notes.md - uses: actions/upload-artifact@v4 with: name: build-artifacts - path: src/github.com/kubernetes-sigs/cri-tools/_output + path: _output diff --git a/hack/release-notes.sh b/hack/release-notes.sh index 68ecedcf7d..42fad9813a 100755 --- a/hack/release-notes.sh +++ b/hack/release-notes.sh @@ -18,7 +18,7 @@ set -euo pipefail BUILD_DIR=build BINARY=$BUILD_DIR/release-notes -VERSION=v0.16.8 +VERSION=v0.17.2 mkdir -p $BUILD_DIR curl -sSfL --retry 5 --retry-delay 10 -o $BINARY \ diff --git a/hack/release.sh b/hack/release.sh index e5d00f3e32..9a2e190540 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -47,7 +47,7 @@ CRI_TEST_PLATFORMS=( # Create releases output directory. PROJECT="sigs.k8s.io/cri-tools" -CRI_TOOLS_ROOT="$GOPATH/src/$PROJECT" +CRI_TOOLS_ROOT="$(go env GOPATH)/src/$PROJECT" OUTPUTDIR=$CRI_TOOLS_ROOT/_output/releases mkdir -p "$OUTPUTDIR"