Skip to content

Commit

Permalink
Add GitHub Actions workflow for publishing packages
Browse files Browse the repository at this point in the history
  • Loading branch information
koesie10 committed Oct 22, 2022
1 parent e73b7cf commit 5cb52d0
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish

on:
release:
types: [published]

permissions:
contents: write

concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

jobs:
publish:
runs-on: windows-latest
environment: production
name: Publish
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
- name: Setup MSFS SDK
uses: koesie10/setup-msfs-sdk@v1
with:
url: ${{ secrets.MSFS_SDK_URL }}
- name: Install Yarn
run: yarn install
env:
CHILD_CONCURRENCY: 1
- name: Bootstrap Lerna
run: yarn lerna bootstrap
- name: Version and publish
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
yarn lerna version ${{ github.ref_name }} --no-git-tag-version --no-push --yes
yarn lerna publish from-git --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ typings/

# Optional npm cache directory
.npm
.npmrc

# Optional eslint cache
.eslintcache
Expand Down
3 changes: 2 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"version": "0.5.0"
"version": "0.5.0",
"npmClient": "yarn"
}

0 comments on commit 5cb52d0

Please sign in to comment.