mirror of
https://github.com/CompeyDev/lune-packaging.git
synced 2025-01-09 04:09:09 +00:00
chore: remove unneeded action workflows
This commit is contained in:
parent
6828b154d9
commit
9aef7400ad
2 changed files with 0 additions and 177 deletions
24
.github/workflows/publish.yaml
vendored
24
.github/workflows/publish.yaml
vendored
|
@ -1,24 +0,0 @@
|
|||
name: Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Publish to crates.io
|
||||
uses: katyo/publish-crates@v2
|
||||
with:
|
||||
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
ignore-unpublished-changes: true
|
153
.github/workflows/release.yaml
vendored
153
.github/workflows/release.yaml
vendored
|
@ -1,153 +0,0 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
env:
|
||||
CARGO_TARGET_DIR: output
|
||||
|
||||
jobs:
|
||||
init:
|
||||
name: Init
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.get_version.outputs.value }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Get version from manifest
|
||||
uses: SebRollen/toml-action@9062fbef52816d61278d24ce53c8070440e1e8dd
|
||||
id: get_version
|
||||
with:
|
||||
file: Cargo.toml
|
||||
field: package.version
|
||||
|
||||
build:
|
||||
needs: ["init"]
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- name: Windows x86_64
|
||||
runner-os: windows-latest
|
||||
artifact-name: lune-${{ needs.init.outputs.version }}-windows-x86_64
|
||||
cargo-target: x86_64-pc-windows-msvc
|
||||
|
||||
- name: Linux x86_64
|
||||
runner-os: ubuntu-latest
|
||||
artifact-name: lune-${{ needs.init.outputs.version }}-linux-x86_64
|
||||
cargo-target: x86_64-unknown-linux-gnu
|
||||
|
||||
- name: Linux aarch64
|
||||
runner-os: ubuntu-latest
|
||||
artifact-name: lune-${{ needs.init.outputs.version }}-linux-aarch64
|
||||
cargo-target: aarch64-unknown-linux-gnu
|
||||
|
||||
- name: macOS x86_64
|
||||
runner-os: macos-latest
|
||||
artifact-name: lune-${{ needs.init.outputs.version }}-macos-x86_64
|
||||
cargo-target: x86_64-apple-darwin
|
||||
|
||||
- name: macOS aarch64
|
||||
runner-os: macos-latest
|
||||
artifact-name: lune-${{ needs.init.outputs.version }}-macos-aarch64
|
||||
cargo-target: aarch64-apple-darwin
|
||||
|
||||
name: Build - ${{ matrix.name }}
|
||||
runs-on: ${{ matrix.runner-os }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.cargo-target }}
|
||||
|
||||
- name: Install tooling (aarch64-unknown-linux-gnu)
|
||||
if: matrix.cargo-target == 'aarch64-unknown-linux-gnu'
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y musl-tools clang llvm
|
||||
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
|
||||
|
||||
- name: Build binary
|
||||
shell: bash
|
||||
run: |
|
||||
cargo build \
|
||||
--locked --release --all-features \
|
||||
--target ${{ matrix.cargo-target }}
|
||||
|
||||
- name: Create binary archive
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p staging
|
||||
if [ "${{ matrix.runner-os }}" = "windows-latest" ]; then
|
||||
cp "output/${{ matrix.cargo-target }}/release/lune.exe" staging/
|
||||
cd staging
|
||||
7z a ../release.zip *
|
||||
else
|
||||
cp "output/${{ matrix.cargo-target }}/release/lune" staging/
|
||||
cd staging
|
||||
chmod +x lune
|
||||
zip ../release.zip *
|
||||
fi
|
||||
|
||||
- name: Upload binary artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.artifact-name }}
|
||||
path: release.zip
|
||||
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: ["init", "build"]
|
||||
steps:
|
||||
- name: Download binaries
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: ./binaries
|
||||
|
||||
- name: Discover binaries
|
||||
shell: bash
|
||||
run: |
|
||||
cd ./binaries
|
||||
echo ""
|
||||
echo "Binaries dir:"
|
||||
ls -lhrt
|
||||
echo ""
|
||||
echo "Searching for zipped releases..."
|
||||
for DIR in * ; do
|
||||
if [ -d "$DIR" ]; then
|
||||
cd "$DIR"
|
||||
for FILE in * ; do
|
||||
if [ ! -d "$FILE" ]; then
|
||||
if [ "$FILE" = "release.zip" ]; then
|
||||
echo "Found zipped release '$DIR'"
|
||||
mv "$FILE" "../$DIR.zip"
|
||||
rm -rf "../$DIR/"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
cd ..
|
||||
fi
|
||||
done
|
||||
echo ""
|
||||
echo "Binaries dir:"
|
||||
ls -lhrt
|
||||
cd ..
|
||||
|
||||
- name: Create release
|
||||
uses: softprops/action-gh-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
name: ${{ needs.init.outputs.version }}
|
||||
tag_name: v${{ needs.init.outputs.version }}
|
||||
fail_on_unmatched_files: true
|
||||
files: ./binaries/*.zip
|
||||
draft: true
|
Loading…
Reference in a new issue