sylviiu - workflow_dispatch - c18c0c109a20a674e362440fd2ab3d8735463ab6 #44
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: ezytdl nightly distributable build | |
run-name: ${{ github.actor }} - ${{ github.event_name }} - ${{ github.sha }} | |
on: | |
workflow_dispatch: | |
inputs: | |
name: | |
description: "Release Name" | |
required: false | |
default: 'Stable Release' | |
jobs: | |
release_info: | |
runs-on: ubuntu-latest | |
name: Create release tag | |
permissions: write-all | |
outputs: | |
release_id: ${{ steps.create_release.outputs.id }} | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Get release metadata | |
id: get_release_metadata | |
run: | | |
echo "TAG_NAME=dev.${{github.run_number}}" >> "$GITHUB_ENV" | |
echo "RELEASE_TITLE=${{ inputs.name }}" >> "$GITHUB_ENV" | |
echo "RELEASE_NAME=dev.${{github.run_number}} - ${{ inputs.name }}" >> "$GITHUB_ENV" | |
echo "BODY_PATH=$(echo "$(pwd)/release-notes.md")" >> "$GITHUB_ENV" | |
- name: Create release notes | |
id: create_notes | |
run: | | |
node devscripts/generateReleaseNotes.js stable | |
- name: Create release draft | |
id: create_release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ env.TAG_NAME }} | |
name: ${{ env.RELEASE_NAME }} | |
commit: ${{ github.sha }} | |
draft: true | |
prerelease: false | |
makeLatest: true | |
bodyFile: ${{ env.BODY_PATH }} | |
omitBody: false | |
omitBodyDuringUpdate: true | |
linux-dist: | |
needs: release_info | |
runs-on: ubuntu-22.04 | |
permissions: write-all | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Install Node.js & NPM | |
uses: actions/setup-node@main | |
with: | |
node-version: "18" | |
- name: Install npm deps | |
run: | | |
npm install | |
- name: Build app | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npm run nightly -- --build-number ${{github.run_number}} | |
macos-dist: | |
needs: release_info | |
runs-on: macos-latest | |
permissions: write-all | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Install Node.js & NPM | |
uses: actions/setup-node@main | |
with: | |
node-version: "18" | |
- name: Install npm deps | |
run: | | |
npm install | |
- name: Build app | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npm run nightly -- --build-number ${{github.run_number}} | |
windows-dist: | |
needs: release_info | |
runs-on: windows-latest | |
permissions: write-all | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Install Node.js & NPM | |
uses: actions/setup-node@main | |
with: | |
node-version: "18" | |
- name: Install npm deps | |
run: | | |
npm install | |
- name: Build app | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npm run nightly -- --build-number ${{github.run_number}} | |
#release: | |
# needs: [linux-dist, macos-dist, windows-dist, release_info] | |
# name: "Release the build" | |
# runs-on: "ubuntu-latest" | |
# permissions: write-all | |
# steps: | |
# - name: Publish | |
# uses: eregon/publish-release@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# release_id: ${{ needs.release_info.outputs.release_id }} | |
# - name: Delete older nightly builds | |
# uses: dev-drprasad/[email protected] | |
# with: | |
# keep_latest: 3 | |
# delete_tags: true | |
# delete_tag_pattern: dev | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |