Skip to content

Update mainaction.yml #6

Update mainaction.yml

Update mainaction.yml #6

Workflow file for this run

name: Download and Merge Zip Files
on:
push:
workflow_dispatch:
jobs:
download-and-merge:
runs-on: ubuntu-latest
permissions:
contents: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Download first zip file
run: |
curl -L -o trid.zip https://mark0.net/download/trid_w32.zip
- name: Download second zip file
run: |
curl -L -o triddefs.zip https://mark0.net/download/triddefs.zip
- name: Unzip first file
run: |
unzip trid.zip -d extracted1
- name: Unzip second file
run: |
unzip triddefs.zip -d extracted2
- name: Merge directories
run: |
mkdir -p merged
cp -r extracted1/* merged/
cp -r extracted2/* merged/
- name: Create merged zip file
run: |
zip -r trid-bundled_${{ steps.date.outputs.date }}.zip merged
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: trid-bundled_${{ steps.date.outputs.date }}
path: trid-bundled_${{ steps.date.outputs.date }}.zip
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: v1.0.${{ github.run_number }}
release_name: trid-bundled_${{ steps.date.outputs.date }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: trid-bundled_${{ steps.date.outputs.date }}.zip
asset_name: trid-bundled_${{ steps.date.outputs.date }}.zip
asset_content_type: application/zip