Skip to content

publish new versions (#461) #193

publish new versions (#461)

publish new versions (#461) #193

name: covector version or publish
on:
push:
branches: [next]
jobs:
version-or-release:
runs-on: ubuntu-latest
outputs:
willPublish: ${{ steps.covector-status.outputs.willPublish-app }}
version: ${{ steps.covector-status.outputs.version-app }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: volta-cli/action@v4
- name: covector status
uses: jbolda/covector/packages/action@covector-v0
id: covector-status
with:
command: 'status'
- name: git config
if: ${{ steps.covector-status.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
uses: jbolda/covector/packages/action@covector-v0
id: covector-version
if: ${{ steps.covector-status.outputs.status != 'No changes.' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: 'version'
recognizeContributors: true
- name: Create Pull Request With Versions Bumped
id: cpr
uses: peter-evans/create-pull-request@v6
if: ${{ steps.covector-status.outputs.status != 'No changes.' }}
with:
title: 'Publish New Versions'
commit-message: 'publish new versions'
labels: 'version updates'
branch: 'release'
body: ${{ steps.covector-version.outputs.change }}
create-and-upload-assets:
runs-on: ${{ matrix.platform }}
needs: [version-or-release]
if: needs.version-or-release.outputs.willPublish
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: volta-cli/action@v4
- name: install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: install webkit2gtk (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- run: npm install
- name: build finatr for tauri app
run: npm run build
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v${{ needs.version-or-release.outputs.version }}
releaseName: 'finatr app ${{ needs.version-or-release.outputs.version }}'
releaseBody: 'See the assets to download this version and install. See https://www.finatr.com to access the web version.'
releaseDraft: true
publish:
needs: [version-or-release, create-and-upload-assets]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # required for use of git history
- uses: volta-cli/action@v4
- 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
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: 'publish'
createRelease: true