mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 22:11:38 +00:00
- Updated the checkout step in both CI and release workflows to include submodule support, ensuring all necessary submodules are fetched during the build process.
188 lines
4.9 KiB
YAML
188 lines
4.9 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags: ["v*"]
|
|
|
|
jobs:
|
|
create-release:
|
|
name: Create Release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Create Release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
gh release create ${{ github.ref_name }} --draft --verify-tag --title ${{ github.ref_name }}
|
|
|
|
build-plugin:
|
|
needs: ["create-release"]
|
|
name: Build Roblox Studio Plugin
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Build Atlas
|
|
run: cargo build --release --locked
|
|
|
|
- name: Build Plugin
|
|
run: ./target/release/atlas build plugin.project.json --output Atlas.rbxm
|
|
|
|
- name: Upload Plugin to Release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
gh release upload ${{ github.ref_name }} Atlas.rbxm
|
|
|
|
- name: Upload Plugin to Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Atlas.rbxm
|
|
path: Atlas.rbxm
|
|
|
|
build-vscode:
|
|
needs: ["create-release"]
|
|
name: Build VS Code Extension
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Install Dependencies
|
|
working-directory: vscode-rojo
|
|
run: npm ci
|
|
|
|
- name: Package Extension
|
|
working-directory: vscode-rojo
|
|
run: npx --yes @vscode/vsce package --no-dependencies
|
|
|
|
- name: Rename Extension
|
|
run: mv vscode-rojo/*.vsix atlas.vsix
|
|
|
|
- name: Upload Extension to Release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
gh release upload ${{ github.ref_name }} atlas.vsix
|
|
|
|
- name: Upload Extension to Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: atlas.vsix
|
|
path: atlas.vsix
|
|
|
|
build:
|
|
needs: ["create-release"]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# https://doc.rust-lang.org/rustc/platform-support.html
|
|
include:
|
|
- host: linux
|
|
os: ubuntu-22.04
|
|
target: x86_64-unknown-linux-gnu
|
|
label: linux-x86_64
|
|
|
|
- host: linux
|
|
os: ubuntu-22.04-arm
|
|
target: aarch64-unknown-linux-gnu
|
|
label: linux-aarch64
|
|
|
|
- host: windows
|
|
os: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
label: windows-x86_64
|
|
|
|
- host: windows
|
|
os: windows-11-arm
|
|
target: aarch64-pc-windows-msvc
|
|
label: windows-aarch64
|
|
|
|
- host: macos
|
|
os: macos-latest
|
|
target: x86_64-apple-darwin
|
|
label: macos-x86_64
|
|
|
|
- host: macos
|
|
os: macos-latest
|
|
target: aarch64-apple-darwin
|
|
label: macos-aarch64
|
|
|
|
name: Build (${{ matrix.target }})
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
BIN: atlas
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: ${{ matrix.target }}
|
|
|
|
- name: Restore Rust Cache
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Build Release
|
|
run: cargo build --release --locked --verbose --target ${{ matrix.target }}
|
|
|
|
- name: Save Rust Cache
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Generate Artifact Name
|
|
shell: bash
|
|
env:
|
|
TAG_NAME: ${{ github.ref_name }}
|
|
run: |
|
|
echo "ARTIFACT_NAME=$BIN-${TAG_NAME#v}-${{ matrix.label }}.zip" >> "$GITHUB_ENV"
|
|
|
|
- name: Create Archive and Upload to Release
|
|
shell: bash
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
mkdir staging
|
|
|
|
if [ "${{ matrix.host }}" = "windows" ]; then
|
|
cp "target/${{ matrix.target }}/release/$BIN.exe" staging/
|
|
cd staging
|
|
7z a ../$ARTIFACT_NAME *
|
|
else
|
|
cp "target/${{ matrix.target }}/release/$BIN" staging/
|
|
cd staging
|
|
zip ../$ARTIFACT_NAME *
|
|
fi
|
|
|
|
gh release upload ${{ github.ref_name }} ../$ARTIFACT_NAME
|
|
|
|
- name: Upload Archive to Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
path: ${{ env.ARTIFACT_NAME }}
|
|
name: ${{ env.ARTIFACT_NAME }}
|