Skip to content

v1.1.3-pre.4

v1.1.3-pre.4 #57

Workflow file for this run

name: On new release
on:
release:
types: [published]
permissions: write-all
jobs:
download-invalid-asset:
runs-on: ubuntu-latest
name: Download invalid asset
steps:
- uses: actions/checkout@v4
- name: Download release assets
id: download-assets
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }}
file-path: invalid_asset.zip
name: invalid_asset.zip
mode: download
not-found-behavior: output
- name: Check output
if: steps.download-assets.outputs.file-not-found == 'false'
run: exit 1
upload-release-assets:
runs-on: ubuntu-latest
name: Upload release assets
steps:
- uses: actions/checkout@v4
- name: Create artifact from dist folder
run: zip -r release-files-dist-${{ github.ref_name }}.zip dist
- name: Upload created artifact to release assets
id: upload-assets
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }}
file-path: release-files-dist-${{ github.ref_name }}.zip
download-release-assets:
runs-on: ubuntu-latest
name: Download release assets
needs: upload-release-assets
steps:
- uses: actions/checkout@v4
- name: Download release assets
id: download-assets
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }}
file-path: dist-${{ github.ref_name }}.zip
name: release-files-dist-${{ github.ref_name }}.zip
mode: download
not-found-behavior: output
- name: Check output
if: steps.download-assets.outputs.file-not-found == 'true'
run: exit 1
- name: Upload zip as artifact
uses: actions/upload-artifact@v2
with:
name: dist-${{ github.ref_name }}.zip
path: dist-${{ github.ref_name }}.zip
- name: List files
run: ls -lh
- name: Unzip downloaded file to test folder
run: unzip dist-${{ github.ref_name }}.zip -d test