rojo/.github/workflows/release.yml
Joe 7289f51e83 ci: add GIT_CONFIG_NOSYSTEM environment variable to submodule initialization
- Updated CI workflows in `ci.yml` and `release.yml` to set the `GIT_CONFIG_NOSYSTEM` environment variable during the initialization of the rbx-dom submodule, ensuring consistent behavior across environments.
2026-03-12 20:54:25 -05:00

201 lines
5.3 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
env:
CARGO_INCREMENTAL: "0"
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Install Rokit
uses: CompeyDev/setup-rokit@v0.1.2
- 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
- name: Upload Plugin to Roblox
env:
RBX_API_KEY: ${{ secrets.PLUGIN_UPLOAD_TOKEN }}
RBX_UNIVERSE_ID: ${{ vars.PLUGIN_CI_UNIVERSE_ID }}
RBX_PLACE_ID: ${{ vars.PLUGIN_CI_PLACE_ID }}
run: lune run upload-plugin Atlas.rbxm
build-vscode:
needs: ["create-release"]
name: Build VS Code Extension
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Init vscode-rojo submodule
run: git submodule update --init --depth 1 vscode-rojo
- 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
CARGO_INCREMENTAL: "0"
steps:
- name: Disable Windows Defender
if: runner.os == 'Windows'
run: Set-MpPreference -DisableRealtimeMonitoring $true
- uses: actions/checkout@v4
- name: Init rbx-dom submodule
env:
GIT_CONFIG_NOSYSTEM: "1"
run: git submodule update --init --depth 1 rbx-dom
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
shared-key: release-${{ matrix.target }}
- name: Build Release
env:
CARGO_TERM_VERBOSE: ${{ runner.debug && 'true' || 'false' }}
run: cargo build --release --locked --target ${{ matrix.target }}
- 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 }}