Update Artifacts action version #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Workflow Demo | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Create a text file | |
run: echo "Hello, world!" > hello.txt | |
- name: Archive text file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: hello-artifact | |
path: hello.txt | |
download: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Download text file | |
uses: actions/download-artifact@v4 | |
with: | |
name: hello-artifact | |
path: ./artifacts | |
- name: Display file content | |
run: cat ./artifacts/hello.txt |