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

Publish executable artifacts as part of build pipeline #46

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
122 changes: 91 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,98 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: version
with:
release-type: simple
package-name: glassyPDM
changelog-types: '[
{
"type": "feat",
"section": "Features",
"hidden": false
},
{
"type": "fix",
"section": "Bug Fixes",
"hidden": false
},
{
"type": "perf",
"section": "Miscellaneous",
"hidden": false
},
{
"type": "refactor",
"section": "Miscellaneous",
"hidden": false
},
{
"type": "style",
"section": "Miscellaneous",
"hidden": false
},
{
"type": "misc",
"section": "Miscellaneous",
"hidden": false
}
]'
{
"type": "feat",
"section": "Features",
"hidden": false
},
{
"type": "fix",
"section": "Bug Fixes",
"hidden": false
},
{
"type": "perf",
"section": "Miscellaneous",
"hidden": false
},
{
"type": "refactor",
"section": "Miscellaneous",
"hidden": false
},
{
"type": "style",
"section": "Miscellaneous",
"hidden": false
},
{
"type": "misc",
"section": "Miscellaneous",
"hidden": false
}]'
outputs:
version: ${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }}
release-created: ${{ steps.version.outputs.release-created }}
release-tag: ${{ steps.version.outputs.release-tag }}

publish:
needs: release-please
if: ${{ needs.release-please.outputs.release-created == 'true' }}
permissions:
contents: write
strategy:
matrix:
include:
- platform: 'ubuntu-22.04'
args: ''
- platform: 'windows-latest'
args: '--bundle nsis'
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4

- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Change Version (Windows)
if: matrix.platform == 'windows-latest'
run: |
jq '.version = "${{ needs.release-please.outputs.version }}"' package.json | Out-File -Encoding utf8 package.json.tmp
mv -Force package.json.tmp package.json

- name: Change Version (Unix)
if: matrix.platform != 'windows-latest'
run: |
sed -i "s/\"version\": \".*\"/\"version\": \"${{ needs.release-please.outputs.version }}\"/" package.json

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
# change to libwebkit2gtk-4.1-dev on update to Tauri 2.0
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf

- name: install frontend dependencies
run: pnpm install

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: 'v__VERSION__'
args: ${{ matrix.args }}
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"productName": "glassyPDM",
"version": "0.6.0",
"version": "../package.json",
"identifier": "org.glassypdm.app",
"build": {
"beforeDevCommand": "pnpm dev",
Expand Down