Skip to content

Commit

Permalink
Merge pull request #65 from nebula-aac/update-release
Browse files Browse the repository at this point in the history
[ci] Update release.yaml to just build and release
  • Loading branch information
leecalcote authored Aug 30, 2023
2 parents 8a2fe12 + 4dab60b commit 99f4cb6
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 727 deletions.
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

51 changes: 32 additions & 19 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: Release
name: Publish NPM Package

on:
push:
branches:
- master
release:
types: [published]
workflow_dispatch:
inputs:
release-type:
required: true

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
Expand All @@ -20,20 +23,30 @@ jobs:
with:
node-version: 18

- name: Install Dependencies
run: yarn
- name: Install deps and build
run: |
yarn
yarn build-all
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
node-version: 18
registry-url: "https://registry.npmjs.org"
scope: "@layer5"

- name: Publish to npm
run: yarn publish --release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

#- name: Send a Slack notification if a publish happens
#if: steps.changesets.outputs.published == 'true'
# You can do something when a publish happens.
#run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!"
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@
"packages/*"
],
"packageManager": "[email protected]",
"dependencies": {
"@changesets/cli": "^2.26.2"
},
"dependencies": {},
"devDependencies": {
"prettier": "^3.0.2"
},
"scripts": {
"build-all": "yarn workspaces run build",
"format": "prettier --write \"**/*.{ts,tsx,md}\" --config ./.prettierrc",
"changeset": "changeset",
"version-packages": "changeset version",
"release": "yarn run build-all && changeset publish"
"format": "prettier --write \"**/*.{ts,tsx,md}\" --config ./.prettierrc"
}
}
Loading

0 comments on commit 99f4cb6

Please sign in to comment.