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

Test cross compilation on commits to main branch #10

Merged
merged 1 commit into from
Dec 14, 2024
Merged
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
50 changes: 50 additions & 0 deletions .github/workflows/build-main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build Rust app on main

on:
push:
branches:
- main

jobs:
build-main:
name: Build for ${{ matrix.target }}
strategy:
matrix:
include:
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
archive: linux-arm64
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
archive: linux-x86_64
- target: aarch64-apple-darwin
os: macos-latest
archive: darwin-arm64
- target: x86_64-apple-darwin
os: macos-latest
archive: darwin-x86_64
- target: x86_64-pc-windows-msvc
os: windows-latest
archive: windows-x86_64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- shell: bash
run: |
# Update the version in Cargo.toml
TAG_NAME="v0.0.0"
TAG_NAME="${TAG_NAME#v}"
if [[ "${{ runner.os }}" == "macOS" ]]; then
sed -i"" -e "s/^version = .*/version = \"$TAG_NAME\"/" Cargo.toml
else
sed -i -e "s/^version = .*/version = \"$TAG_NAME\"/" Cargo.toml
fi
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: dotenv
archive: $bin-$tag-${{ matrix.archive }}
target: ${{ matrix.target }}
tar: unix
zip: windows
token: ${{ secrets.GITHUB_TOKEN }}
dry-run: true
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 = "dotenv"
version = "2.0.0"
version = "0.0.0"
edition = "2021"

[dependencies]
Expand Down
Loading