forked from shaka-project/shaka-packager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test action that creates nightly release
- Loading branch information
Showing
1 changed file
with
81 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Copyright 2023 Pluto TV | ||
# Copyright 2022 Google LLC | ||
# | ||
# Use of this source code is governed by a BSD-style | ||
# license that can be found in the LICENSE file or at | ||
# https://developers.google.com/open-source/licenses/bsd | ||
|
||
name: GitHub Nightly Build | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
setup: | ||
name: Setup | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tag: ${{ steps.compute_tag.outputs.tag }} | ||
steps: | ||
- name: Checkout development branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: 'pluto-cmake' | ||
- name: Create tag | ||
uses: actions/github-script@v5 | ||
with: | ||
script: | | ||
github.rest.git.createRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: 'refs/tags/nightly', | ||
sha: context.sha | ||
}) | ||
- name: Compute tag | ||
id: compute_tag | ||
run: | | ||
# Strip refs/tags/ from the input to get the tag name, then store | ||
# that in output. | ||
echo "::set-output name=tag::nightly" | ||
draft_release: | ||
name: Create GitHub release | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release_id: ${{ steps.draft_release.outputs.id }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ needs.setup.outputs.tag }} | ||
|
||
- name: Extract release notes | ||
run: | | ||
packager/tools/extract_from_changelog.py --release_notes \ | ||
| tee ../RELEASE_NOTES.md | ||
- name: Draft release | ||
id: draft_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BUILD_TOKEN_EPHEMERAL}} | ||
with: | ||
tag_name: ${{ needs.setup.outputs.tag }} | ||
release_name: ${{ needs.setup.outputs.tag }} | ||
body_path: RELEASE_NOTES.md | ||
draft: true | ||
|
||
lint: | ||
needs: setup | ||
name: Lint | ||
uses: ./.github/workflows/lint.yaml | ||
with: | ||
ref: ${{ needs.setup.outputs.tag }} | ||
|
||
build_and_test: | ||
needs: [setup, lint, draft_release] | ||
name: Build and test | ||
uses: ./.github/workflows/build.yaml | ||
with: | ||
ref: ${{ needs.setup.outputs.tag }} |