diff --git a/.github/workflows/go-postsubmit.yml b/.github/workflows/go-postsubmit.yml index a2b5a30a..d449ec9d 100644 --- a/.github/workflows/go-postsubmit.yml +++ b/.github/workflows/go-postsubmit.yml @@ -11,9 +11,6 @@ env: # Common versions GO_VERSION: '1.21' GO_REQUIRED_MIN_VERSION: '' -defaults: - run: - working-directory: go/src/open-cluster-management.io/cluster-proxy jobs: images: @@ -24,10 +21,9 @@ jobs: arch: [ amd64, arm64 ] steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 1 - path: go/src/open-cluster-management.io/cluster-proxy - name: install Go uses: actions/setup-go@v2 with: @@ -51,10 +47,9 @@ jobs: needs: [ images ] steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 1 - path: go/src/open-cluster-management.io/cluster-proxy - name: create run: | echo ${{ secrets.DOCKER_PASSWORD }} | docker login quay.io --username ${{ secrets.DOCKER_USER }} --password-stdin diff --git a/.github/workflows/go-presubmit.yml b/.github/workflows/go-presubmit.yml index 9d6774cd..09852bdf 100644 --- a/.github/workflows/go-presubmit.yml +++ b/.github/workflows/go-presubmit.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: install Go uses: actions/setup-go@v2 with: @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Linelint uses: fernandrone/linelint@0.0.4 verify: @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: install Go uses: actions/setup-go@v2 with: @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: install Go uses: actions/setup-go@v2 with: @@ -75,7 +75,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: install Go uses: actions/setup-go@v2 with: @@ -88,7 +88,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: install Go uses: actions/setup-go@v2 with: diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml index 2ad3c954..037562ef 100644 --- a/.github/workflows/go-release.yml +++ b/.github/workflows/go-release.yml @@ -11,20 +11,15 @@ env: GITHUB_REF: ${{ github.ref }} CHART_NAME: 'cluster-proxy' -defaults: - run: - working-directory: go/src/open-cluster-management.io/cluster-proxy - jobs: env: name: prepare release env runs-on: ubuntu-latest steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 1 - path: go/src/open-cluster-management.io/cluster-proxy - name: get release version run: | echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV @@ -48,10 +43,9 @@ jobs: arch: [ amd64, arm64 ] steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 1 - path: go/src/open-cluster-management.io/cluster-proxy - name: install Go uses: actions/setup-go@v2 with: @@ -75,10 +69,9 @@ jobs: needs: [ env, images ] steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 1 - path: go/src/open-cluster-management.io/cluster-proxy - name: create run: | echo ${{ secrets.DOCKER_PASSWORD }} | docker login quay.io --username ${{ secrets.DOCKER_USER }} --password-stdin @@ -100,10 +93,9 @@ jobs: needs: [ env, image-manifest ] steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 1 - path: go/src/open-cluster-management.io/cluster-proxy - name: setup helm uses: azure/setup-helm@v1 - name: chart package @@ -112,12 +104,20 @@ jobs: pushd release helm package ../charts/${{ env.CHART_NAME }}/ popd + - name: generate changelog + run: | + echo "# Cluster Proxy ${{ needs.env.outputs.RELEASE_VERSION }}" > /home/runner/work/changelog.txt - name: publish release - uses: ncipollo/release-action@v1 + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag: ${{ env.RELEASE_VERSION }} - artifacts: "go/src/open-cluster-management.io/cluster-proxy/release/*.tgz" - token: ${{ secrets.GITHUB_TOKEN }} + body_path: /home/runner/work/changelog.txt + files: | + release/*.tgz + draft: true + prerelease: false + generate_release_notes: true - name: submit charts to OCM chart repo uses: actions/github-script@v6 with: