-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
5,935 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Release | ||
|
||
on: | ||
# This job runs when a new release is published | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14' | ||
- run: npm ci | ||
|
||
# Store the name of the release | ||
# See https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions | ||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
|
||
- run: npm version $RELEASE_VERSION --no-git-tag-version | ||
|
||
- name: Compile the source code | ||
run: node esbuild.js | ||
|
||
- name: Copy package.json | ||
run: cp package.json dist/package.json | ||
|
||
- env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Publish | ||
run: cd dist && npm publish --access public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env node | ||
|
||
import '../src/commands/export'; | ||
import '../src/commands/permissions'; | ||
import '../src/commands/remove'; | ||
import '../src/commands/status'; | ||
import '../src/commands/up'; | ||
import '../src/commands/variables'; | ||
|
||
require('@oclif/command').run() | ||
.then(require('@oclif/command/flush')) | ||
.catch((err: any) => { | ||
const oclifHandler = require('@oclif/errors/handle'); | ||
|
||
// Show errors with stack traces | ||
// try { | ||
// const clean = require("clean-stack"); | ||
// console.error(clean(err.stack || '', { pretty: true })); | ||
// } catch (e) { | ||
// console.error(e); | ||
// } | ||
|
||
return oclifHandler(err); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const fs = require('fs'); | ||
const localPkgJson = JSON.parse(fs.readFileSync('./package.json', 'utf-8')); | ||
|
||
require('esbuild').build({ | ||
entryPoints: ['bin/lift.ts'], | ||
bundle: true, | ||
platform: 'node', | ||
outfile: 'dist/lift', | ||
minify: true, | ||
external: Object.keys({ | ||
...(localPkgJson.dependencies || {}), | ||
...(localPkgJson.devDependencies || {}), | ||
...(localPkgJson.peerDependencies || {}) | ||
}) | ||
}); |
Oops, something went wrong.