Skip to content

Commit

Permalink
Fix: actionを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi committed Jun 18, 2024
1 parent 3f21e5f commit c6b527d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 77 deletions.
74 changes: 19 additions & 55 deletions .github/workflows/build-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/[email protected]
- uses: oven-sh/setup-bun@v1
with:
version: 7

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm

- name: Get cache
id: cache
uses: actions/cache@v3
with:
path: |
~/.pnpm-store
node_modules
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
bun-version: latest

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
Expand All @@ -55,15 +37,15 @@ jobs:
RAW_VERSION="${{ github.ref_name }}" # "
VERSION=${RAW_VERSION#v}
fi
node update-version.js $VERSION
bun update-version.js $VERSION
echo Version: $VERSION
- name: Build with vite
run: |
pnpm build:vite
bun build:vite
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: vite-compiled
path: dist
Expand Down Expand Up @@ -101,37 +83,19 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/[email protected]
- uses: oven-sh/setup-bun@v1
with:
version: 7

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm

- name: Get cache
id: cache
uses: actions/cache@v3
with:
path: |
~/.pnpm-store
node_modules
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
bun-version: latest

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
pnpm i
bun i
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: vite-compiled
path: dist
Expand All @@ -145,7 +109,7 @@ jobs:
RAW_VERSION="${{ github.ref_name }}" # "
VERSION=${RAW_VERSION#v}
fi
node update-version.js $VERSION
bun update-version.js $VERSION
echo Version: $VERSION
- name: Build electron
Expand All @@ -160,7 +124,7 @@ jobs:
mv "${FILE}" "${FILE%.*}-${{ matrix.ext }}.${FILE##*.}"
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}-electron-built
path: ${{ matrix.path }}
Expand All @@ -174,30 +138,30 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download windows binary
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: windows-electron-built
path: dist

- name: Download macos x64 binary
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mac-x64-electron-built
path: dist

- name: Download macos arm64 binary
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mac-arm64-electron-built
path: dist

- name: Download linux binary
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux-electron-built
path: dist
Expand Down Expand Up @@ -270,7 +234,7 @@ jobs:
fi
- name: Upload release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.version }}
prerelease: ${{ steps.version.outputs.preview }}
Expand Down
26 changes: 5 additions & 21 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,17 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 7
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
uses: actions/checkout@v4

- name: Get cache
id: cache
uses: actions/cache@v3
- uses: oven-sh/setup-bun@v1
with:
path: |
~/.pnpm-store
node_modules
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
bun-version: latest

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
pnpm i
bun i
- name: Run Lint
run: |
pnpm lint
bun lint
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "kiitecafe-desktop",
"productName": "Kiite Cafe Desktop",
"private": true,
"version": "0.0.0",
"version": "0.5.0",
"main": "dist/main.js",
"scripts": {
"dev": "vite",
Expand Down

0 comments on commit c6b527d

Please sign in to comment.