Skip to content

Commit

Permalink
Remove download command
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Oct 8, 2024
1 parent 5022bc9 commit febc416
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 1,130 deletions.
93 changes: 47 additions & 46 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ defaults:
shell: bash

jobs:
manifest:
prerelease:
runs-on: ubuntu-latest

needs:
- package
outputs:
value: ${{ steps.prerelease.outputs.value }}

steps:
- uses: actions/checkout@v4

- name: Prerelease Check
id: prerelease
run: |
Expand All @@ -31,33 +29,6 @@ jobs:
echo value=true >> $GITHUB_OUTPUT
fi
- name: Install Rust Toolchain
run: rustup toolchain install stable --profile minimal

- name: Build
run: cargo build --release

- name: Download GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >-
./target/release/filepack
download
--github-release casey/filepack/${{ github.ref_name }}
release
- name: Create Manifest
run: ./target/release/filepack create --deny all release

- name: Publish Manifest
uses: softprops/[email protected]
with:
draft: false
files: release/filepack.json
prerelease: ${{ steps.prerelease.outputs.value }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package:
strategy:
matrix:
Expand Down Expand Up @@ -97,6 +68,9 @@ jobs:

runs-on: ${{ matrix.os }}

needs:
- prerelease

steps:
- uses: actions/checkout@v4

Expand All @@ -119,25 +93,11 @@ jobs:
}}
run: |
sudo apt-get install gcc-arm-linux-gnueabihf
sudo ln -s /usr/bin/arm-linux-gnueabihf-gcc /usr/bin/arm-linux-musleabihf-gcc
- name: Install AArch64 Toolchain (Windows)
if: ${{ matrix.target == 'aarch64-pc-windows-msvc' }}
run: rustup target add aarch64-pc-windows-msvc

- name: Install musl-tools
if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }}
run: sudo apt-get install musl-tools

- name: Prerelease Check
id: prerelease
run: |
if [[ ${{ github.ref_name }} =~ ^[0-9]+[.][0-9]+[.][0-9]+$ ]]; then
echo value=false >> $GITHUB_OUTPUT
else
echo value=true >> $GITHUB_OUTPUT
fi
- name: Package
id: package
env:
Expand Down Expand Up @@ -167,3 +127,44 @@ jobs:
prerelease: ${{ steps.prerelease.outputs.value }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

manifest:
runs-on: ubuntu-latest

needs:
- package
- prerelease

steps:
- uses: actions/checkout@v4

- name: Download Release Archives
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >-
gh release download
--repo casey/filepack
--pattern '*'
--dir release
${{ github.ref_name }}
- name: Install Rust Toolchain
run: rustup toolchain install stable --profile minimal

- name: Create Manifest
run: cargo run create --deny all release

- name: Create Checksums
run: |
cd release
shasum -a 256 * > SHA256SUMS
- name: Publish Manifest
uses: softprops/[email protected]
with:
draft: false
files: release/SHA256SUMS
files: release/filepack.json
prerelease: ${{ steps.prerelease.outputs.value }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit febc416

Please sign in to comment.