Skip to content

Commit

Permalink
update restop.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
aeghn committed Nov 24, 2024
1 parent 2eee711 commit d32507a
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions .github/workflows/restop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,33 @@ name: restop
on: [push]

jobs:
build-linux-musl:
runs-on: ubuntu-latest
steps:
- name: Setup Config
id: config
run: |
echo ::set-output name=SOURCE_TAG::${GITHUB_REF/refs\/tags\//}
echo ::set-output name=TARGET_NAME::x86_64-unknown-linux-musl
- uses: actions/checkout@master
- name: Build
uses: stevenleadbeater/rust-musl-builder@master
with:
args: /bin/bash -c "export DESTINY_API_KEY=${{ secrets.DESTINY_API_KEY }} && rustup toolchain install 1.81.0 && rustup target add x86_64-unknown-linux-musl --toolchain=1.81.0 && rustup override set 1.81.0 && cargo build --release --target=x86_64-unknown-linux-musl"
- name: Process and Package
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
env:
SOURCE_TAG: ${{ steps.config.outputs.SOURCE_TAG }}
TARGET_NAME: ${{ steps.config.outputs.TARGET_NAME }}
run: echo SOURCE_TAG ${SOURCE_TAG} && echo TARGET_NAME ${TARGET_NAME} && ls -l src/target/ && cp src/target/${TARGET_NAME}/release/restop . && zip -j restop_${TARGET_NAME}_${SOURCE_TAG}.zip restop
x86_64-2010-build:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2010_x86_64
steps:
- name: Setup Config
id: config
run: |
echo ::set-output name=SOURCE_TAG::${GITHUB_REF/refs\/tags\//}
echo ::set-output name=TARGET_NAME::x86_64-unknown-linux-musl
- uses: actions/checkout@v1
- name: Build
run: |
curl https://sh.rustup.rs -sSf | bash -s -- -y
. $HOME/.cargo/env
cargo build --release
- name: Process and Package
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
env:
SOURCE_TAG: ${{ steps.config.outputs.SOURCE_TAG }}
TARGET_NAME: ${{ steps.config.outputs.TARGET_NAME }}
run: echo SOURCE_TAG ${SOURCE_TAG} && echo TARGET_NAME ${TARGET_NAME} && ls -l src/target/ && cp src/target/${TARGET_NAME}/release/restop . && zip -j restop_${TARGET_NAME}_${SOURCE_TAG}.zip restop

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
restop_${{ steps.config.outputs.TARGET_NAME }}_${{ steps.config.outputs.SOURCE_TAG }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
restop_${{ steps.config.outputs.TARGET_NAME }}_${{ steps.config.outputs.SOURCE_TAG }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d32507a

Please sign in to comment.