From 7af93c600f9dad1f841252b74884d763d6832eca Mon Sep 17 00:00:00 2001 From: Kien La Date: Sun, 24 Dec 2023 14:16:29 -0500 Subject: [PATCH] Publish --- .github/workflows/ci.yml | 1 - .github/workflows/publish.yml | 36 +++++++++++++++++++++++++++++++++++ .node-version | 1 + bin/publish | 2 +- package.json | 2 +- 5 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/publish.yml create mode 100644 .node-version diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4e6467..4550c83 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,5 +11,4 @@ jobs: - uses: actions/checkout@v3 - uses: oven-sh/setup-bun@v1 - run: bin/setup - - run: node --version - run: bin/test diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..c507605 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,36 @@ +name: "Create Release" +on: + workflow_dispatch: + inputs: + version: + description: Version Number + required: true +jobs: + package: + name: Package + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 # bun doesn't support publishing yet + with: + node-version: '20.x' + - uses: oven-sh/setup-bun@v1 + - run: bin/setup + - run: node --version + - env: + NODE_AUTH_TOKEN: ${{ secrets.DIGITS_NPM_TOKEN }} + run: ls -la ~ && bin/publish + release: + name: Release + needs: package + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + - uses: ncipollo/release-action@v1 + with: + tag: v${{ github.event.inputs.version }} diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..d5a1596 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +20.10.0 diff --git a/bin/publish b/bin/publish index 4c661a6..268354f 100755 --- a/bin/publish +++ b/bin/publish @@ -1,4 +1,4 @@ #!/bin/sh set -e bin/build -bun run publish +npm publish diff --git a/package.json b/package.json index dcb4b09..320eee6 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "name": "Kien La", "email": "la.kien+digits@gmail.com" }, - "version": "0.6.0", + "version": "0.6.1", "repository": "https://github.com/kla/digits", "type": "module", "main": "./dist/digits.umd.mjs",