feat: initial version #1
Workflow file for this run
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
--- | |
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 }} |