Skip to content

Commit

Permalink
Hotfix for #931
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2b3bfa0 authored Sep 12, 2022
1 parent 9e8bdf4 commit 996b5a4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
1 change: 0 additions & 1 deletion .github/workflows/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
test:
required: false
type: boolean
secrets: inherit
jobs:
images:
runs-on: ubuntu-latest
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
bump:
type: choice
required: true
description: Bump version number
description: Bump version number
options: [major, minor, patch]
default: patch
pull_request:
Expand All @@ -21,14 +21,17 @@ jobs:
git config --global user.email [email protected]
git checkout -b bump/$(npm version ${{ github.event.inputs.bump }})
git push --set-upstream origin --follow-tags HEAD
gh pr create --title "Bump version to $(git describe --tags)" --fill
gh pr create --title "Bump version to $(git describe --tags)" --body "Approve me 🤖"
gh pr merge --squash --auto
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
release:
if: github.event.pull_request.merged && startsWith(github.head_ref, 'bump/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: gh release create --generate-notes --draft {--target=,--title=CML\ ,}$(basename ${{ github.head_ref }})
- run:
gh release create --generate-notes {--title=CML\ ,}$(basename ${{
github.head_ref }})
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
16 changes: 7 additions & 9 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Test & Deploy
on:
schedule:
- cron: '0 8 * * 1' # M H d m w (Mondays at 8:00)
push:
tags: ['v*']
release:
types: [created]
pull_request_target:
workflow_dispatch:
jobs:
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
- run: |
pip install tensorboard
pip install -I protobuf==3.20.1
- run: npm ci
- run: npm ci && npm install --global
- run: npm run test
env:
GITHUB_TOKEN: ${{ github.token }}
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
registry-url: https://registry.npmjs.org
- run: npm install
- run:
npm ${{ github.event_name == 'push' && 'publish' || 'publish
npm ${{ github.event_name == 'release' && 'publish' || 'publish
--dry-run' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -121,11 +121,8 @@ jobs:
cp build/cml-linux{-x64,}
cp build/cml-macos{-x64,}
- uses: softprops/action-gh-release@v1
if: github.event_name == 'push'
if: github.event_name == 'release'
with:
name: CML ${{ steps.build.outputs.tag }}
draft: true
generate_release_notes: true
files: |
build/cml-alpine-arm64
build/cml-alpine-x64
Expand All @@ -143,4 +140,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.TEST_GITHUB_TOKEN }}
images:
needs: packages
uses: .github/workflows/images.yml
secrets: inherit
uses: ./.github/workflows/images.yml
4 changes: 2 additions & 2 deletions bin/legacy/link.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const commands = Object.keys(bin)
describe('command-line interface tests', () => {
for (const command of commands)
test(`legacy cml-${command} behaves as the new cml ${command}`, async () => {
const legacyOutput = await exec(`npx --package=. cml-${command} --help`);
const newOutput = await exec(`npx --package=. cml ${command} --help`);
const legacyOutput = await exec(`cml-${command} --help`);
const newOutput = await exec(`cml ${command} --help`);
expect(legacyOutput).toBe(newOutput);
});
});

0 comments on commit 996b5a4

Please sign in to comment.