Skip to content

Commit

Permalink
Merge branch 'ipdx/release-automation-releases' into ipdx/release-aut…
Browse files Browse the repository at this point in the history
…omation-release-v2.0.0
  • Loading branch information
galargh committed Jun 27, 2024
2 parents 23891b4 + 978d5a6 commit b28d88d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
release:
needs: [check, build]
if: needs.check.outputs.projects != '[]'
name: Release ${{ matrix.project }} [publish=${{ inputs.publish || github.event_name != 'pull_request' }}]
name: Release ${{ matrix.project }} [publish=${{ inputs.publish == 'true' || github.event_name != 'pull_request' }}]
permissions:
# This enables the job to create and/or update GitHub releases
contents: write
Expand All @@ -130,7 +130,8 @@ jobs:
matrix:
project: ${{ fromJSON(needs.check.outputs.projects).*.name }}
env:
PUBLISH: ${{ inputs.publish || github.event_name != 'pull_request' }}
PUBLISH: ${{ inputs.publish == 'true' || github.event_name != 'pull_request' }}
IS_DRAFT: ${{ inputs.draft == 'true' || github.event_name == 'pull_request' }}
steps:
- id: project
env:
Expand Down Expand Up @@ -161,16 +162,17 @@ jobs:
with:
name: kubo
version: v0.16.0
cache: false
- name: Install yq
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release --repo mikefarah/yq download v4.44.2 -p yq_linux_amd64
sudo mv yq_linux_amd64 /usr/bin/yq
sudo chmod +x /usr/bin/yq
# - if: inputs.draft || github.event_name != 'pull_request'
# - if: env.IS_DRAFT == 'false'
# run: yq -i '.release.draft = false' '.goreleaser.yaml'
# - if: (inputs.publish || github.event_name != 'pull_request') && fromJSON(steps.project.outputs.config).latest && !fromJSON(steps.project.outputs.config).prerelease
# - if: env.PUBLISH == 'true' && env.IS_DRAFT == 'false' && fromJSON(steps.project.outputs.config).latest && !fromJSON(steps.project.outputs.config).prerelease
# run: yq -i '.brews.[0].skip_upload = false' '.goreleaser.yaml'
- if: matrix.project == 'node'
env:
Expand Down Expand Up @@ -210,7 +212,7 @@ jobs:
TARGET_COMMITISH: ${{ inputs.target_commitish || (github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.sha) }}
HEADER: '' # TODO(p3): Extract release notes from CHANGELOG.md
- run: ./scripts/generate-checksums.sh
- if: env.PUBLISH == 'true'
- if: env.PUBLISH == 'true' && env.IS_DRAFT == 'false'
env:
GITHUB_TOKEN: ${{ github.token }}
TAG: ${{ fromJSON(steps.project.outputs.config).tag }}
Expand Down

0 comments on commit b28d88d

Please sign in to comment.