Skip to content

Commit

Permalink
ci(backend): release can be made manually
Browse files Browse the repository at this point in the history
  • Loading branch information
szattila98 committed Feb 27, 2024
1 parent 26ce274 commit ffda166
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ name: Conventional commits

on:
push:
branches: ["main"]
branches: ["main", "ci"]
pull_request:
branches: ["**"]
types: [opened, synchronize]
workflow_dispatch:

jobs:
check:
Expand Down
38 changes: 20 additions & 18 deletions .github/workflows/deploy.yml → .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish
on:
push:
branches:
- main
- ci # main
tags:
- "*"

Expand All @@ -27,7 +27,7 @@ jobs:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
platform: [macos-latest, windows-latest] # ubuntu-latest

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -60,57 +60,59 @@ jobs:

- uses: actions/upload-artifact@v3
with:
name: artifact-${{ matrix.platform }}
name: artifact
path: src-tauri/target/release/bundle
retention-days: 7

upload_to_release:
needs: [build, upload_license]
name: Publish binaries
runs-on: ubuntu-latest
if: ${{ github.ref_type == 'tag' }}
# if: ${{ github.ref_type == 'tag' }}
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
path: ~/artifacts
path: ~/
merge-multiple: true

- run: ls -R

- name: Copy artifacts to archive
run: |
mkdir ups-and-downs.app
cp -r /home/runner/artifacts/bundle/macos/ups-and-downs.app ups-and-downs.app
cp -r /home/runner/artifact/bundle/macos/ups-and-downs.app ups-and-downs.app
chmod +x -R ups-and-downs.app
cp -r /home/runner/artifacts/LICENSE/LICENSE ups-and-downs.app/
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.app/
tar -czf ups-and-downs.app.tar.gz ups-and-downs.app/*
mkdir ups-and-downs.dmg
cp -r /home/runner/artifacts/bundle/dmg ups-and-downs.dmg
cp -r /home/runner/artifact/bundle/dmg ups-and-downs.dmg
chmod +x -R ups-and-downs.dmg
cp -r /home/runner/artifacts/LICENSE/LICENSE ups-and-downs.dmg/
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.dmg/
tar -czf ups-and-downs.dmg.tar.gz ups-and-downs.dmg/*
mkdir ups-and-downs.deb
cp -r /home/runner/artifacts/bundle/deb ups-and-downs.deb
cp -r /home/runner/artifact/bundle/deb ups-and-downs.deb
chmod +x -R ups-and-downs.deb
cp -r /home/runner/artifacts/LICENSE/LICENSE ups-and-downs.deb/
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.deb/
tar -czf ups-and-downs.deb.tar.gz ups-and-downs.deb/*
mkdir ups-and-downs.appimage
cp -r /home/runner/artifacts/bundle/appimage ups-and-downs.appimage
cp -r /home/runner/artifact/bundle/appimage ups-and-downs.appimage
chmod +x -R ups-and-downs.appimage
cp -r /home/runner/artifacts/LICENSE/LICENSE ups-and-downs.appimage/
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.appimage/
tar -czf ups-and-downs.appimage.tar.gz ups-and-downs.appimage/*
mkdir ups-and-downs.nsis
cp -r /home/runner/artifacts/bundle/nsis ups-and-downs.nsis
cp -r /home/runner/artifact/bundle/nsis ups-and-downs.nsis
chmod +x -R ups-and-downs.nsis
cp -r /home/runner/artifacts/LICENSE/LICENSE ups-and-downs.nsis/
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.nsis/
tar -czf ups-and-downs.nsis.tar.gz ups-and-downs.nsis/*
mkdir ups-and-downs.msi
cp -r /home/runner/artifacts/bundle/msi ups-and-downs.msi
cp -r /home/runner/artifact/bundle/msi ups-and-downs.msi
chmod +x -R ups-and-downs.msi
cp -r /home/runner/artifacts/LICENSE/LICENSE ups-and-downs.msi/
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.msi/
tar -czf ups-and-downs.msi.tar.gz ups-and-downs.msi/*
- uses: svenstaro/upload-release-action@v1-release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

on:
push:
branches: ["main"]
branches: ["main", "ci"]
workflow_dispatch:

permissions:
Expand Down
2 changes: 1 addition & 1 deletion cog.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ignore_merge_commits = true
branch_whitelist = ["main"]
branch_whitelist = ["main", "ci"]
pre_bump_hooks = ["yarn install --immutable", "yarn version {{version}}"]
post_bump_hooks = ["git push", "git push origin --tags"]

Expand Down

0 comments on commit ffda166

Please sign in to comment.