Skip to content

Commit

Permalink
build: use release-please & workspaces-publish for versioning & publi…
Browse files Browse the repository at this point in the history
…shing
  • Loading branch information
tada5hi committed Dec 21, 2023
1 parent a917572 commit ce6ac24
Show file tree
Hide file tree
Showing 8 changed files with 15,621 additions and 18,219 deletions.
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

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

This file was deleted.

33 changes: 21 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,54 @@ on:

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

env:
NODE_VERSION: 18

permissions:
packages: write
contents: write
pull-requests: write

defaults:
run:
shell: bash

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
if: steps.release.outputs.releases_created == 'true'
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install
if: steps.release.outputs.releases_created == 'true'
uses: ./.github/actions/install
with:
node-version: ${{ env.NODE_VERSION }}
node-registry: ${{ env.NODE_REGISTRY }}

- name: Build
if: steps.release.outputs.releases_created == 'true'
uses: ./.github/actions/build

- name: Commit & Publish
id: changesets
uses: changesets/action@v1
with:
publish: npm run release
commit: "chore(release): publish"
title: "chore(release): publish"
- name: Publish
if: steps.release.outputs.releases_created == 'true'
run: npx workspaces-publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- uses: tada5hi/action-docker-image-publish@v3
if: steps.changesets.outputs.published == 'true'
if: steps.release.outputs.releases_created == 'true'
with:
registryTag: |
latest
${{ fromJSON(steps.changesets.outputs.publishedPackages)[0].version }}
${{ steps.release.outputs['packages/portal--major'] }}.${{ steps.release.outputs['packages/portal--minor'] }}.${{ steps.release.outputs['packages/portal--patch'] }}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{

}
18 changes: 0 additions & 18 deletions lerna.json

This file was deleted.

Loading

0 comments on commit ce6ac24

Please sign in to comment.