Skip to content

Commit

Permalink
Fix: syntax fixes for GHA prerelease refactor (#2488)
Browse files Browse the repository at this point in the history
* refactor(ci): move ci:config:get to cli & upgrade to oclif (#2483)

* fix: fix inputs for workflow_call in promote and promote-release (#2481)

* fix: checkout repo in order to run prerelease validation script (#2482)

* chore: move lib/pipelines/api to root for new source of all api calls.

* rename files

* change js to ts

* refactor: move files

* chore: upgrade to oclif

* chore: delete duplicate file

* fix: proper naming for request func

* fix: delete unused funciton

---------

Co-authored-by: Katy Bowman <[email protected]>

* fix: move prerelease test to after promote

* fix: string concat tag version

* fix: syntax error

* fix: don't call "fromJSON" on strings

* fix: remove all fromJSON on strings

---------

Co-authored-by: Katy Bowman <[email protected]>
  • Loading branch information
ryandagg and k80bowman authored Sep 28, 2023
1 parent 581c4d2 commit dff587b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/create-cli-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: ./.github/workflows/publish-npm.yml
with:
isStableRelease: ${{ fromJSON(needs.get-version-channel.outputs.isStableRelease) }}
channel: ${{ fromJSON(needs.get-version-channel.outputs.channel) }}
channel: ${{ needs.get-version-channel.outputs.channel }}
secrets: inherit

pack-upload:
Expand All @@ -53,5 +53,5 @@ jobs:
with:
version: ${{ needs.get-version-channel.outputs.version }}
isStableRelease: ${{ fromJSON(needs.get-version-channel.outputs.isStableRelease) }}
channel: ${{ fromJSON(needs.get-version-channel.outputs.channel) }}
channel: ${{ needs.get-version-channel.outputs.channel }}
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
sudo apt-get install -y awscli jq
- name: promote
env:
prerelease-channel: ${{ fromJSON(inputs.channel) || 'beta'}}
prerelease-channel: ${{ inputs.channel || 'beta'}}
run: |
SHA=$(npm view heroku@${{ inputs.version }} --json | jq -r '.gitHead[0:7]')
yarn oclif promote --deb --xz --root="./packages/cli" --sha="$SHA" --indexes --version=${{ inputs.version }} --channel=${{ fromJSON(inputs.isStableRelease) && 'stable' || env.prerelease-channel }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ jobs:
then
yarn lerna publish --yes from-package
else
yarn lerna publish --dist-tag ${{ fromJSON(inputs.channel) || 'beta' }} --yes from-package
yarn lerna publish --dist-tag ${{ inputs.channel || 'beta' }} --yes from-package
fi
shell: bash
18 changes: 9 additions & 9 deletions .github/workflows/start-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,13 @@ jobs:
yarn --immutable --network-timeout 1000000
./scripts/release/validate-prerelease
beta-smoke-tests:
needs: [ get-version-channel, validate-prerelease ]
uses: ./.github/workflows/test-installed-cli.yml
secrets: inherit
with:
version: ${{ needs.get-version-channel.outputs.version }}

publish-github-tag:
needs: [ get-version-channel, validate-prerelease ]
# pub-hk-ubuntu-22.04- due to IP allow list issues with public repos: https://salesforce.quip.com/bu6UA0KImOxJ
runs-on: pub-hk-ubuntu-22.04-small
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: v${{ fromJSON(needs.get-version-channel.outputs.version) }}
TAG_NAME: ${{ format('v{0}', needs.get-version-channel.outputs.version) }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
Expand All @@ -66,4 +59,11 @@ jobs:
uses: ./.github/workflows/create-cli-release.yml
secrets: inherit
with:
isStableCandidate: ${{ false }}
isStableCandidate: ${{ false }}

prerelease-smoke-tests:
needs: [ create-prerelease ]
uses: ./.github/workflows/test-installed-cli.yml
secrets: inherit
with:
version: ${{ needs.get-version-channel.outputs.version }}
2 changes: 1 addition & 1 deletion scripts/postrelease/test_release
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ declare -a COMMANDS=(
"$CMD_BIN regions"
"$CMD_BIN releases --app heroku-cli-test-staging"
"$CMD_BIN run ls -a heroku-cli-test-staging -- --color"
"$CMD_BIN run -x -a heroku-cli-test-staging -- 'bash -c \"exit 2\"'"
"$CMD_BIN run -x -a heroku-cli-test-staging -- 'bash -c \"exit 0\"'"
"$CMD_BIN run:detached \"echo 'Hello World'\" -a heroku-cli-test-staging"
"$CMD_BIN sessions"
"$CMD_BIN spaces"
Expand Down

0 comments on commit dff587b

Please sign in to comment.