Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
fix: ci
  • Loading branch information
greenhat616 committed Jul 19, 2024
1 parent 68a83d7 commit 462ea2f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
if: contains(matrix.profile.target, 'musl')
run: |
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall cross
cargo binstall cross -y
- name: Build
if: contains(matrix.profile.target, 'musl') == false
run: cargo +nightly build --release --target ${{ matrix.profile.target }}
Expand All @@ -43,17 +43,17 @@ jobs:
- name: Archive
run: |
mkdir -p target/release
cp target/${{ matrix.profile.target }}/release/nyanpasu_service target/release/nyanpasu_service
tar -czf nyanpasu_service-${{ matrix.profile.target }}.tar.gz target/release/nyanpasu_service
cp target/${{ matrix.profile.target }}/release/nyanpasu-service target/release/nyanpasu-service
tar -czf nyanpasu-service-${{ matrix.profile.target }}.tar.gz target/release/nyanpasu-service
- name: Calc the archive signature
run: sha256sum nyapasu_service-${{ matrix.profile.target }}.tar.gz > nyapasu_service-${{ matrix.profile.target }}.tar.gz.sha256
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: nyanpasu_service-${{ matrix.profile.target }}
name: nyanpasu-service-${{ matrix.profile.target }}
path: |
nyanpasu_service-${{ matrix.profile.target }}.tar.gz
nyanpasu_service-${{ matrix.profile.target }}.tar.gz.sha256
nyanpasu-service-${{ matrix.profile.target }}.tar.gz
nyanpasu-service-${{ matrix.profile.target }}.tar.gz.sha256
release_windows:
name: Build ${{ matrix.profile.target }}
Expand All @@ -77,15 +77,15 @@ jobs:
- name: Archive
run: |
mkdir -p target/release
cp target/${{ matrix.profile.target }}/release/nyanpasu_service.exe target/release/nyanpasu_service.exe
7z a -tzip nyanpasu_service-${{ matrix.profile.target }}.zip target/release/nyanpasu_service.exe
cp target/${{ matrix.profile.target }}/release/nyanpasu-service.exe target/release/nyanpasu-service.exe
7z a -tzip nyanpasu-service-${{ matrix.profile.target }}.zip target/release/nyanpasu-service.exe
- name: Calc the archive signature
shell: pwsh
run: Get-FileHash nyanpasu_service-${{ matrix.profile.target }}.zip -Algorithm SHA256 | Format-List > nyanpasu_service-${{ matrix.profile.target }}.zip.sha256
run: Get-FileHash nyanpasu-service-${{ matrix.profile.target }}.zip -Algorithm SHA256 | Format-List > nyanpasu-service-${{ matrix.profile.target }}.zip.sha256
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: nyanpasu_service-${{ matrix.profile.target }}
name: nyanpasu-service-${{ matrix.profile.target }}
path: |
nyanpasu_service-${{ matrix.profile.target }}.zip
nyanpasu_service-${{ matrix.profile.target }}.zip.sha256
nyanpasu-service-${{ matrix.profile.target }}.zip
nyanpasu-service-${{ matrix.profile.target }}.zip.sha256
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
if: contains(matrix.profile.target, 'musl')
run: |
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall cross
cargo binstall cross -y
- name: Build
if: contains(matrix.profile.target, 'musl') == false
run: cargo +nightly build --release --target ${{ matrix.profile.target }}
Expand All @@ -48,16 +48,16 @@ jobs:
- name: Archive
run: |
mkdir -p target/release
cp target/${{ matrix.profile.target }}/release/nyanpasu_service target/release/nyanpasu_service
tar -czf nyanpasu_service-${{ matrix.profile.target }}.tar.gz target/release/nyanpasu_service
cp target/${{ matrix.profile.target }}/release/nyanpasu-service target/release/nyanpasu-service
tar -czf nyanpasu-service-${{ matrix.profile.target }}.tar.gz target/release/nyanpasu-service
- name: Calc the archive signature
run: sha256sum nyapasu_service-${{ matrix.profile.target }}.tar.gz > nyapasu_service-${{ matrix.profile.target }}.tar.gz.sha256
- name: Upload Release Asset
uses: softprops/action-gh-release@v2
with:
files: |
nyanpasu_service-${{ matrix.profile.target }}.tar.gz
nyanpasu_service-${{ matrix.profile.target }}.tar.gz.sha256
nyanpasu-service-${{ matrix.profile.target }}.tar.gz
nyanpasu-service-${{ matrix.profile.target }}.tar.gz.sha256
release_windows:
name: Release ${{ github.event.release.tag_name }} for ${{ matrix.profile.target }}
strategy:
Expand All @@ -80,14 +80,14 @@ jobs:
- name: Archive
run: |
mkdir -p target/release
cp target/${{ matrix.profile.target }}/release/nyanpasu_service.exe target/release/nyanpasu_service.exe
7z a -tzip nyanpasu_service-${{ matrix.profile.target }}.zip target/release/nyanpasu_service.exe
cp target/${{ matrix.profile.target }}/release/nyanpasu-service.exe target/release/nyanpasu-service.exe
7z a -tzip nyanpasu-service-${{ matrix.profile.target }}.zip target/release/nyanpasu-service.exe
- name: Calc the archive signature
shell: pwsh
run: Get-FileHash nyanpasu_service-${{ matrix.profile.target }}.zip -Algorithm SHA256 | Format-List > nyanpasu_service-${{ matrix.profile.target }}.zip.sha256
run: Get-FileHash nyanpasu-service-${{ matrix.profile.target }}.zip -Algorithm SHA256 | Format-List > nyanpasu-service-${{ matrix.profile.target }}.zip.sha256
- name: Upload Release Asset
uses: softprops/action-gh-release@v2
with:
files: |
nyanpasu_service-${{ matrix.profile.target }}.tar.gz
nyanpasu_service-${{ matrix.profile.target }}.tar.gz.sha256
nyanpasu-service-${{ matrix.profile.target }}.tar.gz
nyanpasu-service-${{ matrix.profile.target }}.tar.gz.sha256

0 comments on commit 462ea2f

Please sign in to comment.