Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 28 additions & 11 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,47 @@ jobs:
build:
permissions:
contents: write

pull-requests: write

runs-on: ubuntu-latest

steps:
# Step 1: Check out your repository's code
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0

# Step 2: Generate the changelog
- name: Generate Changelog
id: changelog
uses: TriPSs/conventional-changelog-action@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
output-file: "CHANGELOG.md"
preset: 'angular'
#point to custom config file
#config-file-path: "./changelog-config.js"

git-push: 'false'

# Step 3: Commit and push the updated CHANGELOG.md
- name: Commit Updated Changelog
uses: stefanzweifel/git-auto-commit-action@v5
- name: Create Pull Request
# This step only runs if the changelog action created a new version
if: steps.changelog.outputs.skipped == 'false'
uses: auto-pr/easy-pull-request@v1
with:
commit_message: "chore(docs): update CHANGELOG.md [skip ci]"
file_pattern: "CHANGELOG.md"

token: ${{ secrets.GITHUB_TOKEN }}

# The name of the new branch to create
branch: 'changelog/release-v${{ steps.changelog.outputs.version }}'

# The branch to merge into
base_branch: 'main'

# The title of the pull request
title: 'chore(release): v${{ steps.changelog.outputs.version }}'

# The commit message to use
commit_message: 'chore(release): v${{ steps.changelog.outputs.version }}'

# The body of the pull request, using the changelog output
body: |
Automated release PR for v${{ steps.changelog.outputs.version }}.

${{ steps.changelog.outputs.changelog }}
12 changes: 8 additions & 4 deletions .github/workflows/unity-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ on:
jobs:
checkChangedFiles:
runs-on: ubuntu-latest

outputs: # <--- 1. DEFINE JOB OUTPUTS HERE
csharp_files_changed: ${{ steps.changed-csharp-files.outputs.any_changed }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: ${{ env.PROJECT_PATH }}

- name: Get all changed csharp files
id: changed-csharp-files
Expand All @@ -38,12 +37,17 @@ jobs:
name: Run Runtime Tests
runs-on: ubuntu-latest
needs: [checkChangedFiles]
if: steps.changed-csharp-files.outputs.any_changed == 'true'
if: needs.checkChangedFiles.outputs.csharp_files_changed == 'true'
env:
PROJECT_PATH: 'my-package'
UNITY_VERSION: '6000.2.8f1'

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: ${{ env.PROJECT_PATH }}

- name: Cache Unity Library
uses: actions/cache@v4
with:
Expand Down
Loading