Skip to content

Commit

Permalink
Merge pull request #37 from superfaceai/feature/go-public
Browse files Browse the repository at this point in the history
Feature/go public
  • Loading branch information
TheEdward162 authored Apr 26, 2021
2 parents 3ab5869 + 6828552 commit aa29d8d
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 22 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
uses: actions/setup-node@v2
with:
registry-url: https://registry.npmjs.org/
scope: "@superfaceai"
node-version: "14"
- name: Checkout
uses: actions/[email protected]
- name: Get yarn cache directory path
Expand All @@ -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/[email protected]
uses: actions/setup-node@v2
with:
registry-url: https://registry.npmjs.org/
scope: "@superfaceai"
node-version: "14"
- name: Checkout
uses: actions/[email protected]
- name: Get yarn cache directory path
Expand All @@ -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/[email protected]
uses: actions/setup-node@v2
with:
registry-url: https://registry.npmjs.org/
scope: "@superfaceai"
node-version: "14"
- name: Checkout
uses: actions/[email protected]
- name: Get yarn cache directory path
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@ jobs:
- name: Checkout
uses: actions/[email protected]
- 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}
Expand All @@ -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 }}
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`
Expand Down
2 changes: 0 additions & 2 deletions CONTRIBUTION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<major>.<minor>.<patch>`.

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

Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -12,9 +12,6 @@
"files": [
"dist/**/*"
],
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
"author": "Superface Team",
"license": "MIT",
"scripts": {
Expand Down

0 comments on commit aa29d8d

Please sign in to comment.