1
0
Fork 0

Try using github-script

pull/1497/head
Konrad Pabjan 2023-08-17 12:08:33 -04:00
parent 3f8afe681b
commit 65c1647e72
1 changed files with 6 additions and 7 deletions

View File

@ -59,10 +59,9 @@ jobs:
echo '${{ env.file1 }}' > artifact-path/first.txt echo '${{ env.file1 }}' > artifact-path/first.txt
echo '${{ env.file2 }}' > artifact-path/second.txt echo '${{ env.file2 }}' > artifact-path/second.txt
# We're using node -e to call the functions directly available in the @actions/artifact package - uses: actions/github-script@v6
- name: Upload artifacts using uploadArtifact() with:
run: | script: |
node -e "Promise.resolve(require('./packages/artifact/lib/artifact').create().uploadArtifact('my-artifact-${{ matrix.runs-on }}',['artifact-path/first.txt','artifact-path/second.txt'], process.argv[1]))" "${{ github.workspace }}" const script = require('./packages/artifact/lib/artifact')
const uploadResult = await script.create().uploadArtifact('my-artifact-${{ matrix.runs-on }}',['artifact-path/first.txt','artifact-path/second.txt'], ${{ github.workspace }})