From 1e0b97d0dc5fade899b39eddc0154e2dedc26b6f Mon Sep 17 00:00:00 2001 From: TheEdward162 Date: Thu, 22 Apr 2021 19:32:14 +0200 Subject: [PATCH 1/6] feat: update CI for npm public release --- .github/workflows/publish.yml | 9 ++++++--- .npmrc | 1 - package.json | 3 --- 3 files changed, 6 insertions(+), 7 deletions(-) delete mode 100644 .npmrc diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 32f5515..60411ec 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,17 +15,20 @@ jobs: - name: Checkout uses: actions/checkout@v2.3.4 - name: Setup Node.js environment - uses: actions/setup-node@v1.4.4 + uses: actions/setup-node@v2 with: - registry-url: "https://npm.pkg.github.com" + # registry-url: "https://npm.pkg.github.com" # Defaults to the user or organization that owns the workflow file scope: "@superfaceai" + node-version: "14" + - name: Install dependencies run: yarn install - name: Test run: yarn test - name: Build run: yarn build + - name: Publish Git preparation run: | echo Publishing as version ${GITHUB_REF##*/v} @@ -36,4 +39,4 @@ jobs: - name: Publish run: yarn publish --new-version ${GITHUB_REF##*/v} --verbose env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPMJS_BOT_PAT }} diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 7640353..0000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -registry=https://npm.pkg.github.com/superfaceai diff --git a/package.json b/package.json index 5aa41ed..77536ad 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,6 @@ "files": [ "dist/**/*" ], - "publishConfig": { - "registry": "https://npm.pkg.github.com/" - }, "author": "Superface Team", "license": "MIT", "scripts": { From 996e45013849179894d5f0e336c746142bfb54ad Mon Sep 17 00:00:00 2001 From: TheEdward162 Date: Thu, 22 Apr 2021 20:15:52 +0200 Subject: [PATCH 2/6] feat: update CI for npm public release --- .github/workflows/publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 60411ec..4cb0107 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,6 +18,7 @@ jobs: uses: actions/setup-node@v2 with: # registry-url: "https://npm.pkg.github.com" + registry-url: https://registry.npmjs.org/ # Defaults to the user or organization that owns the workflow file scope: "@superfaceai" node-version: "14" @@ -37,6 +38,6 @@ jobs: git config --global user.name "Foo Bar" git tag -d ${GITHUB_REF##*/} - name: Publish - run: yarn publish --new-version ${GITHUB_REF##*/v} --verbose + run: yarn publish --new-version ${GITHUB_REF##*/v} --verbose --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPMJS_BOT_PAT }} From 85872ef30d3f5911d06505a02dc7265dda2d37be Mon Sep 17 00:00:00 2001 From: TheEdward162 Date: Thu, 22 Apr 2021 20:39:14 +0200 Subject: [PATCH 3/6] feat: update README for npm public release --- README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9d95e29..063b6ae 100644 --- a/README.md +++ b/README.md @@ -31,13 +31,7 @@ Superface AST definitions for Javascript/Typescript. The types in this repositor ## Install -To install this package, first add the github superface repository to your npm config. Use your github name as your login and generate a personal access token with at least the `repo` and `read:packages` permissions in Github to use as password: - -```shell -npm login --scope=@superfaceai --registry=https://npm.pkg.github.com -``` - -Then install the ast into one of your projects: +Install the ast into one of your projects: ```shell yarn add @superfaceai/ast-js @@ -93,7 +87,7 @@ Package publishing is done through GitHub release functionality. Use semver for the version tag. It must be in format of `v..`. -Github Actions workflow will pick up the release and publish it as one of the [packages](https://github.com/superfaceai/ast-js/packages). +Github Actions workflow will pick up the release and publish it as one of the [packages](https://www.npmjs.com/package/@superfaceai/ast). ## Maintainers From a5be3056455b52adbe1d3008f870abd75700f72b Mon Sep 17 00:00:00 2001 From: TheEdward162 Date: Thu, 22 Apr 2021 21:12:51 +0200 Subject: [PATCH 4/6] feat: update CONTRIBUTION_GUIDE for public release --- CONTRIBUTION_GUIDE.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CONTRIBUTION_GUIDE.md b/CONTRIBUTION_GUIDE.md index 4efdd69..ce7d8c8 100644 --- a/CONTRIBUTION_GUIDE.md +++ b/CONTRIBUTION_GUIDE.md @@ -24,8 +24,6 @@ Follow these steps: 1. **Fork & Clone** the repository 2. **Setup** the Superface AST - - Create `.npmrc` with following line `@superfaceai:registry=https://npm.pkg.github.com` - - Authenticate to github npm package registry `npm login --registry=https://npm.pkg.github.com` - Install packages with `yarn install` or `npm install` - Build with `yarn build` or `npm run build` - Run tests with `yarn test` or `npm test` From 936ad119d2249d0a148c98940dcbc406a0bd3186 Mon Sep 17 00:00:00 2001 From: TheEdward162 Date: Mon, 26 Apr 2021 11:11:33 +0200 Subject: [PATCH 5/6] update main CI flow node setup --- .github/workflows/main.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce96968..96dd898 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,11 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - name: Setup Node.js environment - uses: actions/setup-node@v1.4.4 + uses: actions/setup-node@v2 + with: + registry-url: https://registry.npmjs.org/ + scope: "@superfaceai" + node-version: "14" - name: Checkout uses: actions/checkout@v2.3.4 - name: Get yarn cache directory path @@ -45,7 +49,11 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - name: Setup Node.js environment - uses: actions/setup-node@v1.4.4 + uses: actions/setup-node@v2 + with: + registry-url: https://registry.npmjs.org/ + scope: "@superfaceai" + node-version: "14" - name: Checkout uses: actions/checkout@v2.3.4 - name: Get yarn cache directory path @@ -72,7 +80,11 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - name: Setup Node.js environment - uses: actions/setup-node@v1.4.4 + uses: actions/setup-node@v2 + with: + registry-url: https://registry.npmjs.org/ + scope: "@superfaceai" + node-version: "14" - name: Checkout uses: actions/checkout@v2.3.4 - name: Get yarn cache directory path From 6828552550759a715f881aebc56246d6816ac8a4 Mon Sep 17 00:00:00 2001 From: TheEdward162 Date: Mon, 26 Apr 2021 20:20:50 +0200 Subject: [PATCH 6/6] feat: stage for npm release --- CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6755155..cf2dac5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ ## [Unreleased] +## [0.0.23] - 2021-04-26 + +### Changed +* Publish to npm + +## [0.0.22] - 2021-03-21 + +### Changed +* Map security requirements + +## [0.0.21] - 2021-02-04 + ### Added * Added `IterationAtomNode` * Added `IterationAtomNode` to `CallStatementNode` and `InlineCallNode` diff --git a/package.json b/package.json index 77536ad..3547ac9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@superfaceai/ast", - "version": "0.2.0", + "version": "0.0.23", "description": "Superface profile and map language ASTs, https://superface.ai", "main": "dist/language.js", "source": "src/index.ts",