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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 32f5515..4cb0107 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,17 +15,21 @@ 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" + registry-url: https://registry.npmjs.org/ # 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} @@ -34,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.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/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/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` diff --git a/README.md b/README.md index 5c236af..287e48c 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 diff --git a/package.json b/package.json index 5aa41ed..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", @@ -12,9 +12,6 @@ "files": [ "dist/**/*" ], - "publishConfig": { - "registry": "https://npm.pkg.github.com/" - }, "author": "Superface Team", "license": "MIT", "scripts": {