deploy-nightly
Deploy a nightly release to a GitHub release. Supports deleting old nightlys and automatically insert a shortened hash + date.
Example
name: Deploy Nightly
on:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
jobs:
nightly:
name: Deploy nightly
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
... # build your asset first
- name: Deploy Windows release
if: matrix.os == 'windows-latest'
uses: WebFreak001/deploy-nightly@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
with:
upload_url: https://uploads.github.com/repos/Pure-D/serve-d/releases/20717582/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part
release_id: 20717582 # same as above (id can just be taken out the upload_url, it's used to find old releases)
asset_path: ./myapp.zip # path to archive to upload
asset_name: build-name-v1.3.1-$$.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
assets_names_regex: "build-name-v\\d\\.\\d\\.\\d-.+\\.zip" # optional Regex for assets names recognition (this is example of asset name matching used regex - "build-name-v1.2.3.zip")
asset_content_type: application/zip # required by GitHub API
max_releases: 7 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted