Skip to content

Update rust.yml

Update rust.yml #19

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: windows-latest
outputs:
artifact-url: ${{ steps.artifact-upload-step.outputs.artifact-url }}
steps:
- uses: actions/checkout@master
- name: Build
run: cargo build --release --verbose
- name: Upload
uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
name: Binary
path: |
target/release/hi-rust-release.exe
- name: Output artifact ID
run: echo 'Artifact ID is ${{ steps.artifact-upload-step.outputs.artifact-url }}'
build2:
runs-on: ubuntu-latest
needs: build
steps:
- run: cat /etc/os-release
- env:
OUTPUT1: ${{needs.build.outputs.artifact-url}}
run: echo "Artifact ID from previous job is $OUTPUT1"
- env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
OUTPUT1: ${{needs.build.outputs.artifact-url}}
run: wget -O output --header="Authorization:\ token\ $TOKEN" $OUTPUT1
- run: ls -lih
permissions:
contents: write