-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Nicolas Elie <[email protected]>
- Loading branch information
1 parent
470b693
commit 346aa3c
Showing
3 changed files
with
44 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,11 @@ Deploy a nightly release to a GitHub release. Supports deleting old nightlys and | |
|
||
name: Deploy Nightly | ||
on: | ||
# This can be used to automatically publish nightlies at UTC nighttime | ||
schedule: | ||
- cron: '0 2 * * *' # run at 2 AM UTC | ||
# This can be used to allow manually triggering nightlies from the web interface | ||
workflow_dispatch: | ||
|
||
jobs: | ||
nightly: | ||
|
@@ -25,8 +28,6 @@ jobs: | |
- name: Deploy Windows release | ||
if: matrix.os == 'windows-latest' | ||
uses: WebFreak001/[email protected] | ||
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) | ||
|
@@ -35,3 +36,20 @@ jobs: | |
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 | ||
``` | ||
### Advanced Use | ||
if you want to publish a release to another repository or from a different commit, you can configure the API token, API repository endpoint and commit sha for the generated filename like this: | ||
```yml | ||
with: | ||
# can be used to specify a custom token, otherwise defaults to the auto | ||
# generated token for the current GitHub Action context `${secrets.GITHUB_TOKEN}` | ||
token: ${secrets.MyCustomToken} | ||
# used for checking for existing files by inserting into the filename (only | ||
# the first 6 characters are used) | ||
sha: 547fdf5 | ||
# this is where the API calls go to list asset files, must match the repo from | ||
# the upload_url | ||
repo: Pure-D/serve-d | ||
``` |
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
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