Last active
August 24, 2023 23:15
-
-
Save carlos-a-g-h/31b46d302130a2f836bfa99edaddb693 to your computer and use it in GitHub Desktop.
Download a file and upload as a github release (THIS IS NOT LEGAL)
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
# WARNING: This is not how you should use a CI/CD plaftform, use privately and at your own risk | |
name: URL uploader | |
on: | |
workflow_dispatch: | |
inputs: | |
LINK: | |
type: string | |
required: true | |
FILENAME: | |
type: string | |
required: true | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download the given link | |
run: wget "${{ inputs.LINK }}" -O "${{ inputs.FILENAME }}" | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: "default" | |
release_name: "File: ${{ inputs.FILENAME }}" | |
draft: false | |
prerelease: false | |
- name: Upload downloaded file | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: "${{ inputs.FILENAME }}" | |
asset_name: "${{ inputs.FILENAME }}" | |
asset_content_type: application/octet-stream |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment