generated from LizardByte/template-base
-
-
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.
- Loading branch information
1 parent
033e8f4
commit 0953154
Showing
1 changed file
with
48 additions
and
26 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 |
---|---|---|
|
@@ -24,19 +24,17 @@ jobs: | |
${{ github.event_name == 'pull_request' && | ||
github.event.pull_request.head.repo.full_name != github.repository && | ||
'external' || 'internal' }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Release | ||
id: setup_release | ||
uses: LizardByte/[email protected] | ||
with: | ||
fail_on_events_api_error: # PRs will fail if this is true | ||
${{ github.event_name == 'pull_request' && 'false' || 'true' }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} # can use GITHUB_TOKEN for read-only access | ||
|
||
- name: Modify Homebrew Formula | ||
# ensure the file is unique | ||
run: | | ||
|
@@ -51,36 +49,29 @@ jobs: | |
git_email: ${{ secrets.GH_BOT_EMAIL }} | ||
git_username: ${{ secrets.GH_BOT_NAME }} | ||
org_homebrew_repo: ${{ github.repository }} | ||
org_homebrew_repo_branch: tests | ||
org_homebrew_repo_branch: tests-${{ runner.os }} | ||
publish: ${{ env.environment == 'internal' && 'true' || 'false' }} # true if internal, false if external | ||
token: ${{ secrets.GH_BOT_TOKEN }} | ||
upstream_homebrew_core_repo: LizardByte/homebrew-core # we don't want to create a PR against upstream | ||
|
||
- name: Create/Update GitHub Release | ||
if: ${{ steps.setup_release.outputs.publish_release == 'true' }} | ||
uses: LizardByte/[email protected] | ||
with: | ||
allowUpdates: true | ||
artifacts: '' | ||
discussionCategory: announcements | ||
generateReleaseNotes: true | ||
name: ${{ steps.setup_release.outputs.release_tag }} | ||
prerelease: true | ||
tag: ${{ steps.setup_release.outputs.release_tag }} | ||
token: ${{ secrets.GH_BOT_TOKEN }} | ||
|
||
pytest: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # we need to fetch the default branch one of the tests | ||
fetch-depth: 0 # we need to fetch the default branch for one of the tests | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
python-version: "3.11" | ||
|
||
- name: Install Dependencies | ||
shell: bash | ||
|
@@ -119,4 +110,35 @@ jobs: | |
uses: codecov/codecov-action@v4 | ||
with: | ||
fail_ci_if_error: true | ||
flags: ${{ runner.os }} | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
release: | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
needs: | ||
- action | ||
- pytest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Release | ||
id: setup-release | ||
uses: LizardByte/[email protected] | ||
with: | ||
fail_on_events_api_error: true | ||
github_token: ${{ secrets.GH_BOT_TOKEN }} | ||
|
||
- name: Create Release | ||
id: action | ||
uses: LizardByte/[email protected] | ||
with: | ||
allowUpdates: false | ||
artifacts: '' | ||
discussionCategory: announcements | ||
generateReleaseNotes: true | ||
name: ${{ steps.setup-release.outputs.release_tag }} | ||
prerelease: true | ||
tag: ${{ steps.setup-release.outputs.release_tag }} | ||
token: ${{ secrets.GH_BOT_TOKEN }} |