generated from LizardByte/template-base
-
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (50 loc) · 1.76 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
name: CI
on:
pull_request:
branches: [master]
types: [opened, synchronize, reopened]
push:
branches: [master]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
action:
environment:
${{ github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository &&
'external' || 'internal' }}
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: # 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: Run Action
id: action
uses: ./
with:
git_email: ${{ secrets.GH_BOT_EMAIL }}
git_username: ${{ secrets.GH_BOT_NAME }}
src_root: ${{ github.workspace }}/tests/
target_repo: ${{ github.repository }}:tests
token: ${{ secrets.GH_BOT_TOKEN }}
- name: Create/Update GitHub Release
if: ${{ steps.setup_release.outputs.publish_release == 'true' }}
uses: LizardByte/[email protected]
with:
allowUpdates: true
body: ''
discussionCategory: announcements
generateReleaseNotes: true
name: ${{ steps.setup_release.outputs.release_tag }}
prerelease: ${{ steps.setup_release.outputs.publish_pre_release }}
tag: ${{ steps.setup_release.outputs.release_tag }}
token: ${{ secrets.GH_BOT_TOKEN }}