Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: properly pass --dir to gh release download #336

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cargo-dist/templates/ci/github_ci.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ jobs:
dist-args: {{{ task.dist_args }}}
install-dist: {{{ task.install_dist }}}
{{%- endfor %}}

runs-on: ${{ matrix.os }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -130,7 +129,8 @@ jobs:
gh release upload ${{ github.ref_name }} $(cat uploads.txt)
echo "uploaded!"

{{%- if global_task %}}
{{%- if global_task %}}

# Build and packages all the platform-agnostic(ish) things
upload-global-artifacts:
needs: upload-local-artifacts
Expand All @@ -147,10 +147,10 @@ jobs:
{{%- endif %}}
- name: Install cargo-dist
run: {{{ global_task.install_dist }}}
# Get all the local artifacts for the global tasks to use
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
- name: Fetch local artifacts
run: |
gh release download ${{ github.ref_name }} target/distrib/
gh release download ${{ github.ref_name }} --dir target/distrib/
- name: Run cargo-dist
# This logic is a bit janky because it's trying to be a polyglot between
# powershell and bash since this will run on windows, macos, and linux!
Expand All @@ -167,7 +167,7 @@ jobs:
cat uploads.txt
gh release upload ${{ github.ref_name }} $(cat uploads.txt)
echo "uploaded!"
{{%- endif %}}
{{%- endif %}}

# Mark the Github Release™ as a non-draft now that everything has succeeded!
publish-release:
Expand Down
11 changes: 5 additions & 6 deletions cargo-dist/tests/snapshots/akaikatana_basic.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
source: cargo-dist/tests/gallery/dist.rs
assertion_line: 486
expression: self.payload
---
================ installer.sh ================
Expand Down Expand Up @@ -1344,7 +1343,6 @@ jobs:
- os: "ubuntu-20.04"
dist-args: "--artifacts=local --target=x86_64-unknown-linux-gnu"
install-dist: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh"

runs-on: ${{ matrix.os }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -1372,7 +1370,8 @@ jobs:
echo "uploading..."
cat uploads.txt
gh release upload ${{ github.ref_name }} $(cat uploads.txt)
echo "uploaded!"
echo "uploaded!"

# Build and packages all the platform-agnostic(ish) things
upload-global-artifacts:
needs: upload-local-artifacts
Expand All @@ -1387,10 +1386,10 @@ jobs:
run: rustup update "1.67.1" --no-self-update && rustup default "1.67.1"
- name: Install cargo-dist
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh"
# Get all the local artifacts for the global tasks to use
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
- name: Fetch local artifacts
run: |
gh release download ${{ github.ref_name }} target/distrib/
gh release download ${{ github.ref_name }} --dir target/distrib/
- name: Run cargo-dist
# This logic is a bit janky because it's trying to be a polyglot between
# powershell and bash since this will run on windows, macos, and linux!
Expand All @@ -1406,7 +1405,7 @@ jobs:
echo "uploading..."
cat uploads.txt
gh release upload ${{ github.ref_name }} $(cat uploads.txt)
echo "uploaded!"
echo "uploaded!"

# Mark the Github Release™ as a non-draft now that everything has succeeded!
publish-release:
Expand Down
11 changes: 5 additions & 6 deletions cargo-dist/tests/snapshots/axolotlsay_basic.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
source: cargo-dist/tests/gallery/dist.rs
assertion_line: 486
expression: self.payload
---
================ installer.sh ================
Expand Down Expand Up @@ -2215,7 +2214,6 @@ jobs:
- os: "ubuntu-20.04"
dist-args: "--artifacts=local --target=x86_64-unknown-linux-gnu"
install-dist: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh"

runs-on: ${{ matrix.os }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -2241,7 +2239,8 @@ jobs:
echo "uploading..."
cat uploads.txt
gh release upload ${{ github.ref_name }} $(cat uploads.txt)
echo "uploaded!"
echo "uploaded!"

# Build and packages all the platform-agnostic(ish) things
upload-global-artifacts:
needs: upload-local-artifacts
Expand All @@ -2254,10 +2253,10 @@ jobs:
submodules: recursive
- name: Install cargo-dist
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh"
# Get all the local artifacts for the global tasks to use
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
- name: Fetch local artifacts
run: |
gh release download ${{ github.ref_name }} target/distrib/
gh release download ${{ github.ref_name }} --dir target/distrib/
- name: Run cargo-dist
# This logic is a bit janky because it's trying to be a polyglot between
# powershell and bash since this will run on windows, macos, and linux!
Expand All @@ -2273,7 +2272,7 @@ jobs:
echo "uploading..."
cat uploads.txt
gh release upload ${{ github.ref_name }} $(cat uploads.txt)
echo "uploaded!"
echo "uploaded!"

# Mark the Github Release™ as a non-draft now that everything has succeeded!
publish-release:
Expand Down