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] Update release.yaml to just build and release #65

Merged
merged 3 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
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: Node.js Package
leecalcote marked this conversation as resolved.
Show resolved Hide resolved

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@v2
leecalcote marked this conversation as resolved.
Show resolved Hide resolved

- 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