diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..d46cb20c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: Publish Package to npmjs +on: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v3 + with: + node-version: "16.x" + registry-url: "https://registry.npmjs.org" + - name: Install Dependencies + run: yarn install --frozen-lockfile + # Writes token to .yarnrc.yml + - name: Setup NPM auth token + run: | + echo npmAuthToken: "${NODE_AUTH_TOKEN}" >> ./.yarnrc.yml + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: yarn publish diff --git a/package.json b/package.json index a1ba5ea8..12a74c16 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.1.10", + "version": "0.2.0", "name": "trino-client", "description": "Trino client library", "author": { @@ -50,4 +50,4 @@ "test:lint": "eslint .", "publish": "yarn build && yarn npm publish" } -} +} \ No newline at end of file