diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..649f8f6 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,21 @@ +name: Publish Package to npmjs +on: + release: + types: [published] +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v5 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v4 + with: + node-version: "20.x" + registry-url: "https://registry.npmjs.org/" + - run: npm ci + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f18e29c..7929615 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Release on: push: tags: - - 'v*' + - "v*" jobs: build-and-release: @@ -17,8 +17,8 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: '20.x' - cache: 'npm' + node-version: "20.x" + cache: "npm" - name: Install dependencies run: npm ci diff --git a/package.json b/package.json index f2d052a..601c051 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/Duke/duke-prompts.git" + "url": "git+https://github.com/Duke-Engineering/duke-notifier.git" }, "keywords": [ "notifications", @@ -63,9 +63,9 @@ }, "license": "MIT", "bugs": { - "url": "https://github.com/Duke/duke-prompts/issues" + "url": "https://github.com/Duke-Engineering/duke-notifier/issues" }, - "homepage": "https://github.com/Duke/duke-prompts#readme", + "homepage": "https://github.com/Duke-Engineering/duke-notifier#readme", "engines": { "node": ">=18.0.0" },