diff --git a/.github/workflows/actions/release-npm-package.yml b/.github/workflows/actions/release-npm-package.yml new file mode 100644 index 0000000..77dcf5e --- /dev/null +++ b/.github/workflows/actions/release-npm-package.yml @@ -0,0 +1,38 @@ +name: Release lib +# permissions required: +# contents: write +# packages: write +# pull-requests: read +# pull-requests: write +# checks: write + +on: + workflow_call: + secrets: + RELEASER_APP_KEY: + description: the private key of the github app that will be used to create the release + required: true + +jobs: + base-jobs: + uses: ./.github/workflows/lib-base.yml + secrets: inherit + permissions: + contents: read + packages: read + pull-requests: write + checks: write + + release: + needs: base-jobs + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + pull-requests: read + steps: + - name: Release lib + uses: smg-real-estate/.github-ts/.github/actions/release@v0.8.10 + with: + releaser-app-id: ${{ vars.RELEASER_APP_ID }} + releaser-app-key: ${{ secrets.RELEASER_APP_KEY }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 3292f97..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,21 +0,0 @@ -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@v4 - # 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-npm.yml b/.github/workflows/release-npm.yml new file mode 100644 index 0000000..2aad946 --- /dev/null +++ b/.github/workflows/release-npm.yml @@ -0,0 +1,19 @@ +name: Publish Package to npmjs +on: + workflow_dispatch: + inputs: + semver: + type: choice + required: true + default: patch + options: [patch, minor, major] + description: The semver of the release. +jobs: + release: + uses: qualipool/swissrets-json/tree/master/.github/workflows/release-npm-package.yml + permissions: + contents: write + packages: write + pull-requests: write + checks: write + secrets: inherit diff --git a/package.json b/package.json index c7fe763..2719e99 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "swissrets", + "name": "@qualipool/swissrets-json", "version": "0.9.0", "description": "A swiss real estate transfer standard.", "directories": { - "doc": "docs" + "schema": "schema" }, "scripts": { "test:unit": "jest --config ./jest.config.js",