diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..d201051 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,27 @@ +name: Version 🔖 + +on: + release: + types: [created] + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + version: + name: Release + runs-on: ubuntu-latest + environment: release + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + - run: npm install -g npm@^9.5.0 + - run: npm ci + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 26ea89c..264b8f7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@coinbase/staking-client-library-ts", - "version": "1.0.0", + "version": "0.2.1", "description": "Coinbase Cloud Staking API Typescript Library", "license": "Apache-2.0", "main": "dist/index.js", @@ -11,6 +11,10 @@ "lint": "eslint . --ext .ts --ignore-pattern '/dist/*/*'", "lintfix": "eslint . --ext .ts --fix --ignore-pattern '/dist/*/*'" }, + "publishConfig": { + "access": "public", + "provenance": true + }, "devDependencies": { "@types/node-jose": "^1.1.10", "@typescript-eslint/eslint-plugin": "^6.7.0",