Skip to content

Commit

Permalink
setup full release flow (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbolda committed Sep 17, 2021
1 parent bd746f4 commit 6d5ced9
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .changes/bigjs-v6.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"finatr": patch
'web': patch
---

Bump big.js to v6 (major), and bump @reach/tabs, date-fns, formik, and papaparse minors.
12 changes: 6 additions & 6 deletions .changes/config.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"gitSiteUrl": "https://github.com/jbolda/finatr",
"packages": {
"finatr": {
"path": "./",
"web": {
"path": "./package.json",
"version": true,
"prepublish": ["yarn", "yarn build"],
"getPublishedVersion": "git rev-list finatr-v${ pkgFile.version } --max-count=1 --pretty 2>/dev/null || echo finatr-v${ pkgFile.version }",
"getPublishedVersion": "git log v${ pkgFile.version } -1 --pretty=%Cgreen${ pkgFile.version } || echo \"not published yet\"",
"publish": "npx netlify-cli deploy --dir=build --prod"
},
"app": {
"path": "./",
"path": "./src-tauri/Cargo.toml",
"version": true,
"getPublishedVersion": "git rev-list app-v${ pkgFile.version } --max-count=1 --pretty 2>/dev/null || echo app-v${ pkgFile.version }",
"dependencies": ["finatr"]
"getPublishedVersion": "git log v${ pkgFile.version } -1 --pretty=%Cgreen${ pkgFile.version } || echo \"not published yet\"",
"dependencies": ["web"]
}
}
}
2 changes: 1 addition & 1 deletion .changes/d3-v7.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'finatr': minor
'web': minor
---

Upgrade d3js to v7.
2 changes: 1 addition & 1 deletion .changes/implement-covector.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"finatr": patch
'web': patch
---

Implement covector for publishing. This will let us achieve a similar outcome to gitflow, but with one branch.
2 changes: 1 addition & 1 deletion .changes/switch-to-parcel.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'finatr': minor
'web': minor
---

Switch from create-react-app to parcel@v2. We have outgrown the use of CRA, and parcel provides much more performant tooling with the opportunity to make more refined choices around testing as it isn't coupled.
2 changes: 1 addition & 1 deletion .changes/switch-to-tailwind.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'finatr': minor
'web': minor
---

This update removes `theme-ui` and replaces it with `tailwindcss`. This improves runtime performance with the tradeoff of greater reliance on classes. While there are opinions on the verbosity of the utility class based system, most of this will be hidden away within components and elements over time.
69 changes: 44 additions & 25 deletions .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,37 @@ on:
- next

jobs:
version-or-publish:
version-or-release:
runs-on: ubuntu-latest
outputs:
change: ${{ steps.covector.outputs.change }}
commandRan: ${{ steps.covector.outputs.commandRan }}
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}
willPublish: ${{ steps.covector.outputs.willPublish-app }}
version: ${{ steps.covector.outputs.version-app }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: volta-cli/action@v1
- name: covector status
uses: jbolda/covector/packages/action@covector-v0
id: covector
with:
command: 'status'
- name: git config
if: ${{ steps.covector.outputs.status != 'No changes.' }}
run: |
git config --global user.name "${{ github.event.pusher.name }}"
git config --global user.email "${{ github.event.pusher.email }}"
- name: covector version-or-publish
- name: covector version
uses: jbolda/covector/packages/action@covector-v0
id: covector
if: ${{ steps.covector.outputs.status != 'No changes.' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: 'version-or-publish'
- name: sync lockfile
if: steps.covector.outputs.commandRan == 'version'
run: npm install
- name: create pull request
command: 'version'
createRelease: true
- name: Create Pull Request With Versions Bumped
id: cpr
uses: peter-evans/create-pull-request@v3
if: steps.covector.outputs.commandRan == 'version'
if: ${{ steps.covector.outputs.status != 'No changes.' }}
with:
title: 'Publish New Versions'
commit-message: 'publish new versions'
Expand All @@ -43,7 +45,8 @@ jobs:

create-and-upload-assets:
runs-on: ${{ matrix.platform }}
if: needs.version-or-publish.outputs.successfulPublish == 'true'
needs: [version-or-release]
if: needs.version-or-release.outputs.willPublish
timeout-minutes: 30

strategy:
Expand All @@ -53,10 +56,7 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: setup node
uses: actions/setup-node@v1
with:
node-version: 12
- uses: volta-cli/action@v1
- name: install rust stable
uses: actions-rs/toolchain@v1
with:
Expand All @@ -67,17 +67,36 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- run: yarn
- run: npm install
- name: build finatr for tauri app
run: yarn build
- run: cargo install tauri-bundler --force
run: npm run build
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: 'App v__VERSION__'
releaseBody: 'See the assets to download this version and install. See https://www.finatr.com to access the web version.\n'
includeDebug: true
tagName: finatr-v__VERSION__
releaseName: 'Release finatr app v__VERSION__'
releaseBody: 'See the assets to download this version of the app and install. See https://www.finatr.com to access the web version.'
releaseDraft: true
prerelease: false

publish:
needs: [version-or-release, create-and-upload-assets]
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # required for use of git history
- name: git config
run: |
git config --global user.name "${{ github.event.pusher.name }}"
git config --global user.email "${{ github.event.pusher.email }}"
- name: covector publish
uses: jbolda/covector/packages/action@covector-v0
id: covector
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: 'publish'
createRelease: true

0 comments on commit 6d5ced9

Please sign in to comment.