github.com/grafana/pyroscope@v1.18.0/.github/workflows/weekly-release.yml (about) 1 name: goreleaser-weekly 2 3 on: 4 push: 5 branches: 6 - 'weekly/f*' 7 8 permissions: 9 contents: write 10 id-token: write 11 12 jobs: 13 goreleaser-weekly: 14 runs-on: ubuntu-x64-large 15 steps: 16 - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 17 with: 18 fetch-depth: 0 19 persist-credentials: false 20 - name: Set GORELEASER_CURRENT_TAG 21 run: echo "GORELEASER_CURRENT_TAG=v0.0.0-$(./tools/image-tag)" >> $GITHUB_ENV 22 - name: Set IMAGE_TAG 23 run: echo "IMAGE_TAG=$(./tools/image-tag)" >> $GITHUB_ENV 24 - name: Set IMAGE_PUBLISH_LATEST=false, so we don't overwrite the latest docker image tag and Homebrew version 25 run: echo "IMAGE_PUBLISH_LATEST=false" >> $GITHUB_ENV 26 - name: Set GITHUB_RELEASE_DISABLE=true, so github releases are skipped 27 run: echo "GITHUB_RELEASE_DISABLE=true" >> $GITHUB_ENV 28 - name: Set GORELEASER_STRIP_DEBUG_INFO=false, so binaries are not stripped of debug info 29 run: echo "GORELEASER_STRIP_DEBUG_INFO=false" >> $GITHUB_ENV 30 - name: Set GORELEASER_LINUX_ONLY=true, so we only build linux binaries 31 run: echo "GORELEASER_LINUX_ONLY=true" >> $GITHUB_ENV 32 # Forces goreleaser to use the correct previous tag for the changelog 33 - name: Set GORELEASER_PREVIOUS_TAG 34 run: echo "GORELEASER_PREVIOUS_TAG=$(git tag -l --sort=-version:refname | grep -E '^weekly-.*' | head -n 2 | tail -1)" >> $GITHUB_ENV 35 - run: git fetch --force --tags 36 - name: Create tags for this weekly release 37 run: | 38 git tag "$GORELEASER_CURRENT_TAG" 39 git tag "$IMAGE_TAG" 40 - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 41 with: 42 go-version: "1.24.12" 43 cache: false 44 # setup docker buildx 45 - name: Set up QEMU 46 uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2 47 - name: Set up Docker Buildx 48 uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2 49 # login to docker hub 50 - id: get-secrets 51 uses: grafana/shared-workflows/actions/get-vault-secrets@bae259f9ed5b6fcb050e3b58adf7aee776d4edb5 52 with: 53 common_secrets: | 54 DOCKERHUB_USERNAME=dockerhub:username 55 DOCKERHUB_PASSWORD=dockerhub:password 56 - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2 57 name: Login to Docker Hub 58 with: 59 username: ${{ env.DOCKERHUB_USERNAME }} 60 password: ${{ env.DOCKERHUB_PASSWORD }} 61 - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 62 with: 63 node-version: 20 64 package-manager-cache: false 65 - run: make frontend/build 66 - uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6 67 with: 68 # ensure this aligns with the version specified in the /Makefile 69 version: v2.13.2 70 args: release --clean --skip=nfpm --timeout 60m 71 env: 72 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 73 - name: Push git tag for weekly release 74 run: git push "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/grafana/pyroscope.git" "${IMAGE_TAG}" 2> /dev/null