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..9b940b4 --- /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-file: '.node-version' + - uses: oven-sh/setup-bun@v1 + - run: bin/setup + - run: node --version + - run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc + - run: echo ${{ secrets.NPM_TOKEN }} | wc -m + - run: ls -la ~ && cat ~/.npmrc && 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",