Skip to content

Commit

Permalink
💚 dummy release to test workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
trydofor committed Oct 21, 2024
1 parent 90583cb commit 6cd8406
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 18 deletions.
6 changes: 6 additions & 0 deletions .changeset/angry-starfishes-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@fessional/razor-common": patch
"@fessional/razor-mobile": patch
---

💚 dummy release to test workflows
14 changes: 14 additions & 0 deletions .changeset/publish-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

## changeset publish
## Tagging and releasing each package is too much

set -x -e
# pnpm -r publish --access public --report-summary --dry-run --no-git-checks
pnpm -r publish --access public --report-summary

## simulate https://github.com/changesets/action/blob/31ff97e8acd3cfd08714eab3721f55da10003255/src/run.ts#L139
## 🦋 New tag: @fessional/[email protected]
jq -r '.publishedPackages[] | select(.name != "@fessional/razor") | "🦋 New tag: \(.name)\(@\(.version))"' pnpm-publish-summary.json

rm -rf pnpm-publish-summary.json
1 change: 1 addition & 0 deletions .changeset/bump-top.sh → .changeset/version-top.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -x -e
pnpm exec changeset status --output version-status.tmp
newv=$(jq -r '.releases[1].newVersion' version-status.tmp)

## replace version in package.json
if [[ "$(uname)" == "Darwin" ]]; then
sed -i '' "s/\"version\": \".*\"/\"version\": \"$newv\"/" package.json
else
Expand Down
28 changes: 13 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- name: Prepare Project
run: |
chmod a+x .changeset/bump-top.sh
chmod a+x .changeset/*.sh
echo "install pnpm-hoist-layer to devDep"
pnpm -w i --no-frozen-lockfile --ignore-pnpmfile
echo "reset the ci lockfile"
Expand Down Expand Up @@ -81,8 +81,8 @@ jobs:
with:
commit: ":bookmark: bumping versions"
title: ":rocket: release versions"
version: .changeset/bump-top.sh
publish: pnpm ver:publish
version: .changeset/version-top.sh
publish: .changeset/publish-all.sh
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -99,12 +99,18 @@ jobs:
echo "| PR Number | ${{ steps.changesets.outputs.pullRequestNumber }} |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
- name: Publish to Npmjs
- name: Github Release
id: release
if: steps.changesets.outputs.published == 'true'
run: |
pnpm publish --access public
uses: halvardssm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: "./package.json"

echo "## Publishing Report" >> $GITHUB_STEP_SUMMARY
- name: Publish Status
if: steps.changesets.outputs.published == 'true'
run: |
echo "## Publish Status" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Package | Version |" >> $GITHUB_STEP_SUMMARY
echo "|-----------|---------|" >> $GITHUB_STEP_SUMMARY
Expand All @@ -116,11 +122,3 @@ jobs:
echo "| $(echo $pkg | jq -r '.name') | $(echo $pkg | jq -r '.version') |" >> $GITHUB_STEP_SUMMARY
done
echo "" >> $GITHUB_STEP_SUMMARY
- name: Github Release
id: release
if: steps.changesets.outputs.published == 'true'
uses: halvardssm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: "./package.json"
2 changes: 1 addition & 1 deletion layers/common/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@fessional/razor-common",
"type": "module",
"version": "0.1.24",
"version": "0.1.26",
"description": "common layer for mobile and desktop",
"main": "./nuxt.config.ts",
"types": "./index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion layers/mobile/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@fessional/razor-mobile",
"type": "module",
"version": "0.1.24",
"version": "0.1.26",
"description": "mobile layer with ionic and capacitor",
"main": "./nuxt.config.ts",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@fessional/razor",
"type": "module",
"version": "0.1.24",
"version": "0.1.26",
"description": "Use front-end tech (Nuxt/Ts) to build multi-platform from one codebase, suitable for small team and app to write app once, apply almost anywhere.",
"packageManager": "[email protected]",
"engines": {
Expand Down

0 comments on commit 6cd8406

Please sign in to comment.