Skip to content

Commit

Permalink
Merge release_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
twistedpair committed Oct 21, 2022
2 parents a5814fc + 39efbbb commit 9599666
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 138 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/push-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
MABL_API_KEY: ${{ secrets.MABL_API_KEY }}
with:
# Try variants
workspace: 4U_SVbTOimwP0txQVsPBew-w
workspace_id: 4U_SVbTOimwP0txQVsPBew-w
workspace-id: 4U_SVbTOimwP0txQVsPBew-w
workspace: vjnf0NH86WlzPTdU5JNhmg-w
workspace_id: vjnf0NH86WlzPTdU5JNhmg-w
workspace-id: vjnf0NH86WlzPTdU5JNhmg-w

- name: List applications
run: mabl applications list
Expand Down
16 changes: 15 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ its own branch, e.g. release_v1.
Releases can then be built from that branch by running

```bash
# Checkout the release branch and merge
git checkout main
git pull
git checkout release_v1
git pull
git merge main

# Compile release
npm run release

Expand All @@ -48,10 +55,17 @@ is retagged. This way users of the action will pick up the new minor
version automatically assuming that only the major version is specified.

In short, the major version tag should be
* deleted (e.g. `git delete -d v1`)
* deleted (e.g. `git tag -d v1`)
* pushed (e.g. `git push --delete origin v1`)
* tagged again (e.g. `git tag v1 1d4a228`)
* pushed (e.g. `git push origin v1`)

```bash
git tag -d v1
git push --delete origin v1
git tag v1 1d4a228
git push origin v1
```



1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
- uses: mablhq/setup-mabl-cli@v1
with:
version: 1.5.6
workspace-id: V2pvHBJ-rprn1n3S4ELs3A-w
env:
MABL_API_KEY: ${{ secrets.MABL_API_KEY }}
Expand Down
6 changes: 5 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ function run() {
function installCli(nodePath, version) {
return __awaiter(this, void 0, void 0, function* () {
const binPrefix = process.platform === 'win32' ? '' : 'bin/';
const installCommand = `./${binPrefix}npm install -g @mablhq/mabl-cli${version ? '@' + version : ''}`;
// --unsafe is required if the installation process needs to build keytar using node-gyp.
// There may be no pre-built binaries for keytar on the host OS. Currently this is the case only
// for linux.
const unsafeFlag = process.platform === 'linux' ? ' --unsafe' : '';
const installCommand = `./${binPrefix}npm install -g @mablhq/mabl-cli${version ? '@' + version : ''}${unsafeFlag}`;
const options = {
cwd: nodePath,
};
Expand Down
129 changes: 2 additions & 127 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "setup-mabl-cli",
"version": "1.2.0",
"version": "1.3.0",
"description": "mabl GitHub action to setup mabl CLI",
"main": "lib/index.js",
"scripts": {
Expand Down
18 changes: 14 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ type Option<T> = T | undefined;
async function run(): Promise<void> {
const version: Option<string> = core.getInput('version', {required: false});
// Allow new or old syntax - some docs said 'workspace', others said 'workspace_id'
const workspaceId: Option<string> = core.getInput('workspace', {required: false})
?? core.getInput('workspace_id', {required: false})
?? core.getInput('workspace-id', {required: false}); // dash case is used by GitHub produced Actions
const workspaceId: Option<string> =
core.getInput('workspace', {required: false}) ??
core.getInput('workspace_id', {required: false}) ??
core.getInput('workspace-id', {required: false}); // dash case is used by GitHub produced Actions

const apiKey: Option<string> = process.env.MABL_API_KEY;

Expand Down Expand Up @@ -38,7 +39,16 @@ async function run(): Promise<void> {

async function installCli(nodePath: string, version?: string): Promise<void> {
const binPrefix = process.platform === 'win32' ? '' : 'bin/';
const installCommand = `./${binPrefix}npm install -g @mablhq/mabl-cli${version ? '@' + version : ''}`

// --unsafe is required if the installation process needs to build keytar using node-gyp.
// There may be no pre-built binaries for keytar on the host OS. Currently this is the case only
// for linux.
const unsafeFlag = process.platform === 'linux' ? ' --unsafe' : '';

const installCommand = `./${binPrefix}npm install -g @mablhq/mabl-cli${
version ? '@' + version : ''
}${unsafeFlag}`;

const options = {
cwd: nodePath,
};
Expand Down

0 comments on commit 9599666

Please sign in to comment.