-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
0c126ca
commit df6b5a9
Showing
5 changed files
with
47 additions
and
44 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 |
---|---|---|
@@ -1,38 +1,22 @@ | ||
name: Node.js Package | ||
name: Bun Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
create: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
create-tag: | ||
if: github.ref == 'refs/heads/master' | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
- name: Set up Bun | ||
uses: oven-sh/setup-bun@v2 | ||
with: | ||
node-version: "lts/*" | ||
bun-version: latest | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Bump version and add -SNAPSHOT suffix | ||
run: | | ||
npm version prerelease --preid=SNAPSHOT | ||
git add package.json | ||
git commit -m "Bump version to $(node -p "require('./package.json').version")" | ||
- name: Create and push tag | ||
run: | | ||
TAG_NAME=$(node -p "require('./package.json').version") | ||
git tag $TAG_NAME | ||
git push origin $TAG_NAME | ||
run: bun install | ||
- name: publish | ||
run: bun publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Push changes | ||
run: git push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_CONFIG_TOKEN: ${{ secrets.NPM_CONFIG_TOKEN }} |
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 @@ | ||
registry=https://registry.npmjs.org/ |
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,5 @@ | ||
#!/usr/bin/env bun | ||
|
||
import hardbrake from "../src/index"; | ||
|
||
await hardbrake(); |
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