Skip to content

Commit dc6749c

Browse files
authored
Hotfix for #931 (#1162)
1 parent 9e8bdf4 commit dc6749c

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

.github/workflows/images.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
test:
55
required: false
66
type: boolean
7-
secrets: inherit
87
jobs:
98
images:
109
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
bump:
66
type: choice
77
required: true
8-
description: Bump version number
8+
description: Bump version number
99
options: [major, minor, patch]
1010
default: patch
1111
pull_request:
@@ -21,14 +21,17 @@ jobs:
2121
git config --global user.email 64868532+iterative-olivaw@users.noreply.github.com
2222
git checkout -b bump/$(npm version ${{ github.event.inputs.bump }})
2323
git push --set-upstream origin --follow-tags HEAD
24-
gh pr create --title "Bump version to $(git describe --tags)" --fill
24+
gh pr create --title "Bump version to $(git describe --tags)" --body "Approve me 🤖"
25+
gh pr merge --squash --auto
2526
env:
26-
GITHUB_TOKEN: ${{ github.token }}
27+
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
2728
release:
2829
if: github.event.pull_request.merged && startsWith(github.head_ref, 'bump/')
2930
runs-on: ubuntu-latest
3031
steps:
3132
- uses: actions/checkout@v2
32-
- run: gh release create --generate-notes --draft {--target=,--title=CML\ ,}$(basename ${{ github.head_ref }})
33+
- run:
34+
gh release create --generate-notes {--title=CML\ ,}$(basename ${{
35+
github.head_ref }})
3336
env:
34-
GITHUB_TOKEN: ${{ github.token }}
37+
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}

.github/workflows/test-deploy.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Test & Deploy
22
on:
33
schedule:
44
- cron: '0 8 * * 1' # M H d m w (Mondays at 8:00)
5-
push:
6-
tags: ['v*']
5+
release:
6+
types: [created]
77
pull_request_target:
88
workflow_dispatch:
99
jobs:
@@ -48,7 +48,7 @@ jobs:
4848
- run: |
4949
pip install tensorboard
5050
pip install -I protobuf==3.20.1
51-
- run: npm ci
51+
- run: npm ci && npm install --global
5252
- run: npm run test
5353
env:
5454
GITHUB_TOKEN: ${{ github.token }}
@@ -99,7 +99,7 @@ jobs:
9999
registry-url: https://registry.npmjs.org
100100
- run: npm install
101101
- run:
102-
npm ${{ github.event_name == 'push' && 'publish' || 'publish
102+
npm ${{ github.event_name == 'release' && 'publish' || 'publish
103103
--dry-run' }}
104104
env:
105105
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -121,11 +121,8 @@ jobs:
121121
cp build/cml-linux{-x64,}
122122
cp build/cml-macos{-x64,}
123123
- uses: softprops/action-gh-release@v1
124-
if: github.event_name == 'push'
124+
if: github.event_name == 'release'
125125
with:
126-
name: CML ${{ steps.build.outputs.tag }}
127-
draft: true
128-
generate_release_notes: true
129126
files: |
130127
build/cml-alpine-arm64
131128
build/cml-alpine-x64
@@ -143,4 +140,5 @@ jobs:
143140
GITHUB_TOKEN: ${{ secrets.TEST_GITHUB_TOKEN }}
144141
images:
145142
needs: packages
146-
uses: .github/workflows/images.yml
143+
secrets: inherit
144+
uses: ./.github/workflows/images.yml

bin/legacy/link.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ const commands = Object.keys(bin)
88
describe('command-line interface tests', () => {
99
for (const command of commands)
1010
test(`legacy cml-${command} behaves as the new cml ${command}`, async () => {
11-
const legacyOutput = await exec(`npx --package=. cml-${command} --help`);
12-
const newOutput = await exec(`npx --package=. cml ${command} --help`);
11+
const legacyOutput = await exec(`cml-${command} --help`);
12+
const newOutput = await exec(`cml ${command} --help`);
1313
expect(legacyOutput).toBe(newOutput);
1414
});
1515
});

0 commit comments

Comments
 (0)