i am so done with this #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
permissions: write-all | |
on: | |
push: | |
branches: | |
- main | |
env: | |
FORCE_COLOR: true | |
jobs: | |
release: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- name: Use Node.js 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build application | |
run: pnpm build | |
- name: Run Electron Builder | |
run: | | |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then | |
pnpm electron-builder --linux --publish always | |
else | |
pnpm electron-builder --win --publish always | |
fi | |
shell: bash | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get release tag | |
id: release_tag | |
run: | | |
echo "release_tag=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- name: Upload DevBuild as release | |
if: github.repository == 'Nexulien/Nexop' | |
run: | | |
for file in dist/*; do | |
gh release upload devbuild "$file" --clobber | |
done | |
gh release edit devbuild --title "DevBuild $RELEASE_TAG" | |
shell: bash | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RELEASE_TAG: ${{ env.release_tag }} |