Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add yarn publish #159

Merged
merged 1 commit into from
Apr 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,67 @@ name: Release
on:
release:
types: [published]

jobs:

npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.CI_USER_PAT }}

# We need deno because the "Build CJS and ESM" step runs `deno run`
- name: Install Deno
uses: denoland/setup-deno@v1

# Setup .npmrc file to publish to npm
- name: Install Node
uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'
scope: '@drashland'

- name: Install deps
run: yarn install

- name: Build CJS and ESM
run: yarn build

- name: Publish
run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}

github:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.CI_USER_PAT }}

# We need deno because the "Build CJS and ESM" step runs `deno run`
- name: Install Deno
uses: denoland/setup-deno@v1

# Setup .npmrc file to publish to github
- name: Install Node
uses: actions/setup-node@v2
with:
registry-url: 'https://npm.pkg.github.com'
scope: '@drashland'

- name: Install deps
run: yarn install

- name: Build CJS and ESM
run: yarn build

- name: Publish
run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-egg:
runs-on: ubuntu-latest
steps:
Expand Down