Skip to content
This repository was archived by the owner on Jul 22, 2023. It is now read-only.

Commit

Permalink
Draft release v0.10.0 and new release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
LPGhatguy committed Jun 13, 2022
1 parent 4322a1a commit 940b086
Show file tree
Hide file tree
Showing 5 changed files with 146 additions and 58 deletions.
54 changes: 39 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,59 @@
name: CI

on:
pull_request:
push:
branches: ["*"]
branches:
- master

pull_request:
branches:
- master

jobs:
build:

name: Build and Test
runs-on: ubuntu-latest

strategy:
matrix:
rust_version: [stable, "1.53.0"]
rust_version: [stable, 1.56.0]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
with:
submodules: true

- name: Setup Rust toolchain
run: |
rustup default ${{ matrix.rust_version }}
rustup component add clippy rustfmt
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust_version }}
override: true
profile: minimal

- name: Build
run: cargo build --locked --verbose

- name: Run tests
- name: Test
run: cargo test --locked --verbose

- name: Rustfmt and Clippy
run: |
cargo fmt -- --check
cargo clippy
if: matrix.rust_version == 'stable'
lint:
name: Rustfmt and Clippy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

- name: Rustfmt
run: cargo fmt -- --check

- name: Clippy
run: cargo clippy
140 changes: 99 additions & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,115 @@ name: Release

on:
push:
tags: ["*"]
tags: ["v*"]

jobs:
windows:
runs-on: windows-latest

create-release:
name: Create Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- uses: actions/checkout@v1
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false

- name: Build release binary
run: cargo build --verbose --locked --release
build:
needs: ["create-release"]
strategy:
fail-fast: false
matrix:
# https://doc.rust-lang.org/rustc/platform-support.html
include:
- host: linux
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
label: linux-x86_64

- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: remodel-win64
path: target/release/remodel.exe
- host: windows
os: windows-latest
target: x86_64-pc-windows-msvc
label: windows-x86_64

macos:
runs-on: macos-latest
- 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: remodel
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
with:
submodules: true

- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Get Version from Tag
shell: bash
# https://github.community/t/how-to-get-just-the-tag-name/16241/7#M1027
run: |
echo "PROJECT_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
echo "Version is: ${{ env.PROJECT_VERSION }}"
- name: Build release binary
run: |
source $HOME/.cargo/env
cargo build --verbose --locked --release
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
profile: minimal

- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: remodel-macos
path: target/release/remodel
- name: Build Release
run: cargo build --release --locked --verbose
env:
# Build into a known directory so we can find our build artifact more
# easily.
CARGO_TARGET_DIR: output

linux:
runs-on: ubuntu-latest
# On platforms that use OpenSSL, ensure it is statically linked to
# make binaries more portable.
OPENSSL_STATIC: 1

steps:
- uses: actions/checkout@v1
with:
submodules: true

- name: Build
run: cargo build --locked --verbose --release

- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: remodel-linux
path: target/release/remodel
- name: Create Release Archive
shell: bash
run: |
mkdir staging
if [ "${{ matrix.host }}" = "windows" ]; then
cp "output/release/$BIN.exe" staging/
cd staging
7z a ../release.zip *
else
cp "output/release/$BIN" staging/
cd staging
zip ../release.zip *
fi
- name: Upload Archive to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: release.zip
asset_name: ${{ env.BIN }}-${{ env.PROJECT_VERSION }}-${{ matrix.label }}.zip
asset_content_type: application/octet-stream

- name: Upload Archive to Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.BIN }}-${{ env.PROJECT_VERSION }}-${{ matrix.label }}.zip
path: release.zip
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased Changes

## 0.10.0 (2022-06-13)
* Switched from `rlua` to `mlua`, which should improve Lua performance slightly. ([#73])
* Updated all dependencies to improve Roblox compatibility.

[#73]: https://github.com/rojo-rbx/remodel/pull/73

## 0.9.1 (2021-10-11)
* Updated to latest rbx-dom libraries.
* Increased Roblox API request timeout from 30 seconds to 3 minutes. ([#63])
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "remodel"
version = "0.9.1"
version = "0.10.0"
description = "A tool to read, modify, and write Roblox objects."
authors = ["Lucien Greathouse <[email protected]>"]
edition = "2018"
Expand Down

0 comments on commit 940b086

Please sign in to comment.