Skip to content

Commit

Permalink
chore: add windows pack, upload, and promote scripts to workflows (#2573
Browse files Browse the repository at this point in the history
)

* chore: add pack:win and upload:win scripts to package.json

* chore: add pack-and-upload-windows to pack-upload workflow

* chore: add promotion of windows installer to promote workflow
  • Loading branch information
k80bowman authored Dec 13, 2023
1 parent ea64be5 commit abf58f1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/pack-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,26 @@ jobs:
pwd
yarn oclif upload tarballs
./scripts/upload/deb
pack-and-upload-windows:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: yarn
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@41775cf0c82ef066f1eb39cea1bd74697ca5b735
- name: Install NSIS
run: brew install nsis
- name: yarn install
run: yarn --immutable --network-timeout 1000000
- name: pack windows installer
run: yarn pack:win
- name: upload windows installer
run: yarn upload:win
1 change: 1 addition & 0 deletions .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
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 }}
yarn oclif promote --win --xz --root="./packages/cli" --sha="$SHA" --indexes --version=${{ inputs.version }} --channel=${{ fromJson(inputs.isStableRelease) && 'stable' || env.prerelease-channel }}
shell: bash
- name: promote Linux install scripts
run: node ./scripts/postrelease/install_scripts.js
11 changes: 8 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,20 +323,25 @@
"heroku-sudo": "@heroku/sudo",
"heroku-webhooks": null,
"sudo": "@heroku/sudo"
},
"windows": {
"name": "Heroku CLI"
}
},
"repository": "heroku/cli",
"scripts": {
"lint": "eslint . --ext .ts --config ../../.eslintrc --ignore-path ../../.eslintignore-lib",
"build": "rm -rf lib && tsc",
"lint": "eslint . --ext .ts --config ../../.eslintrc --ignore-path ../../.eslintignore-lib",
"pack:win": "oclif pack:win --defender-exclusion hidden",
"postpublish": "rm -f oclif.manifest.json",
"posttest": "yarn lint",
"prepack": "yarn run build && oclif manifest",
"pretest": "tsc -p test --noEmit && cd ../.. && yarn build",
"test": "yarn pretest && nyc mocha --forbid-only \"test/**/*.unit.test.ts\" && yarn posttest",
"test:acceptance": "yarn pretest && mocha --forbid-only \"test/**/*.acceptance.test.ts\" && node ./bin/bats-test-runner",
"test:integration": "yarn pretest && mocha --forbid-only \"test/**/*.integration.test.ts\"",
"test:smoke": "yarn pretest && mocha --forbid-only \"test/**/smoke.acceptance.test.ts\"",
"posttest": "yarn lint",
"test": "yarn pretest && nyc mocha --forbid-only \"test/**/*.unit.test.ts\" && yarn posttest",
"upload:win": "oclif upload:win",
"version": "oclif readme --multi && git add README.md ../../docs"
},
"types": "lib/index.d.ts"
Expand Down

0 comments on commit abf58f1

Please sign in to comment.