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

Added workflow to publish on release #30

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
85 changes: 85 additions & 0 deletions .github/workflows/publish-to-auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: "Build and publish challenges"

on:
push:
branches:
- release

# This workflow will build the challenges and publish the binary artifacts as release

jobs:
build-release-challenges:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-20.04]
#platform: [macos-latest, ubuntu-20.04, windows-latest]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: Rust cache
uses: Swatinem/rust-cache@v2

- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf

- name: Install frontend dependencies
run: npm install

- name: Build challenge 1
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: ./challenges/space-navigator/1
tagName: v__VERSION__
releaseName: "Challenges v__VERSION__"
releaseBody: "See the assets to download this version and install."
releaseDraft: true
prerelease: false

- name: Build challenge 2
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: ./challenges/space-navigator/2
tagName: v__VERSION__
releaseName: "Challenges v__VERSION__"
releaseDraft: true
prerelease: false

- name: Build challenge 3
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: ./challenges/space-navigator/3
tagName: v__VERSION__
releaseName: "Challenges v__VERSION__"
releaseDraft: true
prerelease: false

- name: Build challenge 4
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: ./challenges/space-navigator/4
tagName: v__VERSION__
releaseName: "Challenges v__VERSION__"
releaseDraft: true
prerelease: false
108 changes: 54 additions & 54 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions challenges/space-navigator/1/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "broken-navigator-one",
"version": "0.0.0",
"name": "space-navigator-1",
"version": "1.0.0",
"description": "",
"scripts": {
"start": "vite",
Expand Down
4 changes: 2 additions & 2 deletions challenges/space-navigator/1/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "broken-navigator-one"
version = "0.0.0"
name = "space-navigator-1"
version = "1.0.0"
description = "A Tauri App"
authors = ["you"]
license = ""
Expand Down
4 changes: 2 additions & 2 deletions challenges/space-navigator/1/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"withGlobalTauri": false
},
"package": {
"productName": "broken-navigator",
"version": "0.0.0"
"productName": "space-navigator-1",
"version": "1.0.0"
},
"tauri": {
"allowlist": {
Expand Down
4 changes: 2 additions & 2 deletions challenges/space-navigator/2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "broken-navigator-two",
"version": "0.0.0",
"name": "space-navigator-2",
"version": "1.0.0",
"description": "",
"scripts": {
"start": "vite",
Expand Down
4 changes: 2 additions & 2 deletions challenges/space-navigator/2/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "broken-navigator-two"
version = "0.0.0"
name = "space-navigator-2"
version = "1.0.0"
description = "A Tauri App"
authors = ["you"]
license = ""
Expand Down
4 changes: 2 additions & 2 deletions challenges/space-navigator/2/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"withGlobalTauri": false
},
"package": {
"productName": "broken-navigator",
"version": "0.0.0"
"productName": "space-navigator-2",
"version": "1.0.0"
},
"tauri": {
"allowlist": {
Expand Down
4 changes: 2 additions & 2 deletions challenges/space-navigator/3/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "space-navigatior-three",
"version": "0.0.0",
"name": "space-navigator-3",
"version": "1.0.0",
"description": "",
"scripts": {
"start": "vite",
Expand Down
4 changes: 2 additions & 2 deletions challenges/space-navigator/3/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "broken-navigator-three"
version = "0.0.0"
name = "space-navigator-3"
version = "1.0.0"
description = "A Tauri App"
authors = ["you"]
license = ""
Expand Down
4 changes: 2 additions & 2 deletions challenges/space-navigator/3/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"withGlobalTauri": false
},
"package": {
"productName": "broken-navigator",
"version": "0.0.0"
"productName": "space-navigator-3",
"version": "1.0.0"
},
"tauri": {
"allowlist": {
Expand Down
4 changes: 2 additions & 2 deletions challenges/space-navigator/4/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "broken-navigator-four",
"version": "0.0.0",
"name": "space-navigator-4",
"version": "1.0.0",
"description": "",
"scripts": {
"start": "vite",
Expand Down
6 changes: 2 additions & 4 deletions challenges/space-navigator/4/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
[package]
name = "broken-navigator-four"
version = "0.1.0"
name = "space-navigator-4"
version = "1.0.0"
description = "A Tauri App"
authors = ["you"]
license = ""
repository = ""
default-run = "broken-navigator-four"
edition = "2021"
rust-version = "1.60"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
4 changes: 2 additions & 2 deletions challenges/space-navigator/4/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"distDir": "../dist"
},
"package": {
"productName": "broken-navigator-four",
"version": "0.1.0"
"productName": "space-navigator-4",
"version": "1.0.0"
},
"tauri": {
"allowlist": {
Expand Down
Loading