rwar
All checks were successful
build / Create Release (push) Successful in 4s
build / publish (tar.gz, x86_64-unknown-linux-gnu, ubuntu-latest, linux-x86_64) (push) Successful in 3s
build / publish (zip, x86_64-pc-windows-msvc, windows-2022, windows-x86_64) (push) Successful in 11s

This commit is contained in:
2024-07-12 13:36:30 +02:00
parent 330a620b6f
commit 27d21b0367

View File

@@ -44,36 +44,42 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Rust toolchain and cache - name: Log
if: matrix.platform != 'windows-2022'
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
- name: Ensure rust is up to date
if: matrix.platform == 'windows-2022'
run: | run: |
rustup update echo "$env:GITEA_WORKSPACE"
rustup toolchain install nightly echo "$env:GITHUB_WORKSPACE"
- name: Create output directory for windows echo "$GITEA_WORKSPACE"
if: matrix.platform == 'windows-2022' echo "$GITHUB_WORKSPACE"
run: mkdir -f output # - name: Setup Rust toolchain and cache
- name: Create output directory for linux # if: matrix.platform != 'windows-2022'
if: matrix.platform != 'windows-2022' # uses: actions-rust-lang/setup-rust-toolchain@v1
run: mkdir output # with:
- name: Build release # toolchain: nightly
run: cargo +nightly -Z unstable-options b -r --artifact-dir ./output # - name: Ensure rust is up to date
- name: Collect windows artifacts # if: matrix.platform == 'windows-2022'
if: matrix.platform == 'windows-2022' # run: |
run: | # rustup update
cp -r -fo assets $env:GITEA_WORKSPACE/output/ # rustup toolchain install nightly
Compress-Archive -Path $env:GITEA_WORKSPACE/output/* -DestinationPath $env:GITEA_WORKSPACE/${{ gitea.event.repository.name }}_${{ matrix.name }}.${{ matrix.archive }} # - name: Create output directory for windows
- name: Collect linux/macos artifacts # if: matrix.platform == 'windows-2022'
if: matrix.platform != 'windows-2022' # run: mkdir -f output
run: | # - name: Create output directory for linux
cp -rf assets ${GITEA_WORKSPACE}/output/ # if: matrix.platform != 'windows-2022'
tar -czvf ${GITHUB_WORKSPACE}/${{ gitea.event.repository.name }}_${{ matrix.name }}.${{ matrix.archive }} -C ${GITHUB_WORKSPACE}/output/ . # run: mkdir output
- name: Upload artifacts # - name: Build release
uses: ncipollo/release-action@v1 # run: cargo +nightly -Z unstable-options b -r --artifact-dir ./output
with: # - name: Collect windows artifacts
allowUpdates: true # if: matrix.platform == 'windows-2022'
artifacts: "${{ gitea.event.repository.name }}_${{ matrix.name }}.${{ matrix.archive }}" # run: |
# cp -r -fo assets $env:GITEA_WORKSPACE/output/
# Compress-Archive -Path $env:GITEA_WORKSPACE/output/* -DestinationPath $env:GITEA_WORKSPACE/${{ gitea.event.repository.name }}_${{ matrix.name }}.${{ matrix.archive }}
# - name: Collect linux/macos artifacts
# if: matrix.platform != 'windows-2022'
# run: |
# cp -rf assets ${GITEA_WORKSPACE}/output/
# tar -czvf ${GITHUB_WORKSPACE}/${{ gitea.event.repository.name }}_${{ matrix.name }}.${{ matrix.archive }} -C ${GITHUB_WORKSPACE}/output/ .
# - name: Upload artifacts
# uses: ncipollo/release-action@v1
# with:
# allowUpdates: true
# artifacts: "${{ gitea.event.repository.name }}_${{ matrix.name }}.${{ matrix.archive }}"