Skip to content

Commit

Permalink
ci: disable pr labeling due to a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
majori committed Feb 5, 2024
1 parent fa87e4f commit 72e9a42
Showing 1 changed file with 43 additions and 50 deletions.
93 changes: 43 additions & 50 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
pr: ${{ steps.release.outputs.pr }}
prs: ${{ steps.release.outputs.prs }}
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
Expand All @@ -40,61 +40,54 @@ jobs:
permissions:
contents: write
packages: write
pull-requests: write
steps:
# Add the "autorelease: published" and remove tagged, this allows
# monitoring to be enabled that detects failed releases:
- uses: actions/github-script@v4
id: untag-release
- uses: actions/checkout@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
await github.issues.addLabels({
owner,
repo,
issue_number: JSON.parse('${{ needs.release.outputs.pr }}').number,
labels: ['autorelease: published']
});
github.issues.removeLabel({
owner,
repo,
issue_number: JSON.parse('${{ needs.release.outputs.pr }}').number,
name: 'autorelease: tagged',
});
console.log(`Tagged JSON.parse('${{ needs.release.outputs.pr }}').number`)
fetch-depth: 0

# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
- run: git fetch --force --tags

# - run: git fetch --force --tags
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# - uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@v4
with:
go-version: "1.21"

# - uses: actions/setup-go@v4
# with:
# go-version: "1.21"
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
# - uses: actions/cache@v3
# with:
# path: |
# ~/.cache/go-build
# ~/go/pkg/mod
# key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-golang-
- uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_PRIVATE_KEY: ${{ secrets.HOMEBREW_TAP_PRIVATE_KEY }}
WINGET_PKGS_PRIVATE_KEY: ${{ secrets.WINGET_PKGS_PRIVATE_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

# - uses: goreleaser/goreleaser-action@v4
# Pending for https://github.com/google-github-actions/release-please-action/issues/776
# - uses: actions/github-script@v6
# with:
# distribution: goreleaser
# version: latest
# args: release --clean
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# HOMEBREW_TAP_PRIVATE_KEY: ${{ secrets.HOMEBREW_TAP_PRIVATE_KEY }}
# WINGET_PKGS_PRIVATE_KEY: ${{ secrets.WINGET_PKGS_PRIVATE_KEY }}
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# script: |
# const prs = JSON.parse(${{ needs.release.outputs.prs }})
# for (const pr of prs) {
# github.rest.issues.addLabels({
# issue_number: pr.number,
# owner: context.repo.owner,
# repo: context.repo.repo,
# labels: ["autorelease: published"]
# })
# }

0 comments on commit 72e9a42

Please sign in to comment.