-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
130 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
name: Build and Release all | ||
|
||
on: | ||
push: | ||
branches: | ||
- action-needs-refinement-lol | ||
|
||
jobs: | ||
build-backend-binary: | ||
name: Build Backend Binary for Windows, Linux and MacOS | ||
runs-on: [ubuntu-latest, windows-latest, macos-latest] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.16' | ||
|
||
- name: Build Backend Binary | ||
run: | | ||
go build -o occupi-backend ./occupi-backend/cmd/main.go | ||
build-expo-app: | ||
name: Build Expo App | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install Expo CLI | ||
run: | | ||
npm install -g expo-cli | ||
- name: Install Expo dependencies | ||
run: | | ||
cd occupi-frontend | ||
npm install | ||
- name: Build Expo App | ||
run: | | ||
cd occupi-frontend | ||
expo build:web | ||
build-vite-app: | ||
name: Build Vite App | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install Vite | ||
run: | | ||
npm install -g create-vite | ||
- name: Install Vite dependencies | ||
run: | | ||
cd occupi-frontend | ||
npm install | ||
- name: Build Vite App | ||
run: | | ||
cd occupi-frontend | ||
npm run build | ||
build-tauri-app: | ||
name: Build Tauri App | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Rust | ||
uses: actions/setup-rust@v1 | ||
with: | ||
rust-version: '1.53.0' | ||
|
||
- name: Install Tauri | ||
run: | | ||
cargo install tauri-bundler --force | ||
- name: Build Tauri App | ||
run: | | ||
cd occupi-frontend | ||
tauri build | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
needs: [build-backend-binary, build-expo-app, build-vite-app, build-tauri-app] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install GitHub CLI | ||
run: | | ||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 | ||
sudo apt-add-repository https://cli.github.com/packages | ||
sudo apt update | ||
sudo apt install gh | ||
- name: Login to GitHub | ||
run: | | ||
gh auth login | ||
- name: Create a Release | ||
run: | | ||
gh release create v1.0.0 -t "v1.0.0" -n "v1.0.0" ./occupi-backend/occupi-backend ./occupi-frontend/occupi-frontend ./occupi-frontend/dist ./occupi-frontend/build ./occupi-frontend/target/release/occupi-frontend | ||
- name: Upload Release Assets | ||
run: | | ||
gh release upload v1.0.0 ./occupi-backend/occupi-backend ./occupi-frontend/occupi-frontend ./occupi-frontend/dist ./occupi-frontend/build ./occupi-frontend/target/release/occupi-frontend |