diff --git a/.github/images/bmc-button.png b/.github/images/bmc-button.png deleted file mode 100644 index a0f5988..0000000 Binary files a/.github/images/bmc-button.png and /dev/null differ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1a0f3cd --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +name: Build + +on: + push: + branches: ['*'] + pull_request: + +permissions: {} + +defaults: + run: + shell: bash + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v21 + + - name: Extract Tag + id: extract_tag + uses: actions/github-script@v6 + with: + script: | + const prefix = 'refs/tags/v'; + const ref = context.ref; + return ref.startsWith(prefix) ? ref.substring(prefix.length) : ''; + result-encoding: string + + - name: Lint + run: nix develop --command make lint + + - name: Check Format + run: nix develop --command make fmt-check + + - name: Run Tests + run: nix develop --command make test + + - name: Publish to JSR + run: nix develop --command deno publish diff --git a/deno.json b/deno.json index 0fb49b0..e30c83a 100644 --- a/deno.json +++ b/deno.json @@ -1,4 +1,7 @@ { + "name": "@negrel/webpush", + "version": "0.1.0", + "exports": "./mod.ts", "compilerOptions": { "allowJs": false, "strict": true