mirror of
https://github.com/Vomitblood/stort.git
synced 2024-11-26 05:45:26 +08:00
changed github actions workflow to install rustup with defaults accepted
This commit is contained in:
parent
3e813bbe7e
commit
fb2b7b0bf0
|
@ -1,4 +1,4 @@
|
|||
name: Test Build Frontend
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -15,30 +15,21 @@ jobs:
|
|||
image: ubuntu:22.04
|
||||
|
||||
steps:
|
||||
- name: Install git
|
||||
run: apt update && apt install -y git
|
||||
- name: Update APT
|
||||
run: apt update
|
||||
|
||||
- name: Install Git and dependencies for Tauri
|
||||
run: apt install -y git libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
|
||||
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get Variables
|
||||
run: |
|
||||
git config --global --add safe.directory /__w/stort/stort
|
||||
echo "TAG_NAME=commit-$(date +%Y%m%d)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
|
||||
- name: Update packages
|
||||
run: apt update && apt upgrade -y
|
||||
|
||||
- name: Install dependencies for Tauri
|
||||
run: apt install -y libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
|
||||
|
||||
- name: Install Rust
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
. "$HOME/.cargo/env"
|
||||
rustup update
|
||||
|
||||
- name: Install mise
|
||||
- name: Install Mise
|
||||
run: |
|
||||
install -dm 755 /etc/apt/keyrings
|
||||
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null
|
||||
|
@ -46,16 +37,19 @@ jobs:
|
|||
apt update
|
||||
apt install -y mise
|
||||
|
||||
- name: Install mise tools
|
||||
- name: Install Mise Tools
|
||||
run: |
|
||||
mise install
|
||||
mise settings set experimental true
|
||||
|
||||
- name: Install bun packages
|
||||
- name: Install Bun Packages
|
||||
run: mise exec bun --command 'bun install'
|
||||
|
||||
- name: Build Tauri
|
||||
run: mise exec bun --command 'bun run tauri build'
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
. "$HOME/.cargo/env"
|
||||
mise exec bun --command 'bun run tauri build'
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
|
@ -68,7 +62,7 @@ jobs:
|
|||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload build to release
|
||||
- name: Upload Build to Release
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
32
.github/workflows/testing.yml
vendored
Normal file
32
.github/workflows/testing.yml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: Testing
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
testing:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ubuntu:22.04
|
||||
|
||||
steps:
|
||||
- name: Debug shell
|
||||
run: |
|
||||
echo $0
|
||||
echo $SHELL
|
||||
|
||||
- name: Debug Bash shell
|
||||
run: |
|
||||
echo $0
|
||||
echo $SHELL
|
||||
shell: bash
|
||||
|
||||
- name: Debug sh Shell
|
||||
run: echo $0
|
||||
echo $SHELL
|
||||
shell: sh
|
26
build2.sh
Normal file
26
build2.sh
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
IMAGE_NAME="ubuntu:22.04"
|
||||
HOST_PROJECT_DIR="$PWD"
|
||||
CONTAINER_PROJECT_DIR="/app"
|
||||
HOST_OUTPUT_DIR="$PWD/src-tauri/target/release/bundle/appimage"
|
||||
CONTAINER_OUTPUT_DIR="$CONTAINER_PROJECT_DIR/src-tauri/target/release/bundle/appimage"
|
||||
USER_ID=$(id -u)
|
||||
GROUP_ID=$(id -g)
|
||||
|
||||
docker pull $IMAGE_NAME
|
||||
|
||||
# run the docker image and remove on completion
|
||||
docker run --rm -it \
|
||||
-v "$HOST_PROJECT_DIR":$CONTAINER_PROJECT_DIR \
|
||||
$IMAGE_NAME \
|
||||
/bin/bash -c "
|
||||
|
||||
# update packages
|
||||
apt update && apt install curl -y && \
|
||||
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
|
||||
echo $HOME && \
|
||||
source "/root/.cargo/env" && \
|
||||
cargo --version
|
||||
"
|
Loading…
Reference in a new issue