Skip to content

Commit 934ec4e

Browse files
committed
Run workflows on 'main' and 'develop' branches
1 parent f7ec679 commit 934ec4e

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

Diff for: .github/workflows/codeql.yml

+29-29
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ master ]
16+
branches: [main, develop, master]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ master ]
19+
branches: [main, develop, master]
2020
schedule:
21-
- cron: '19 2 * * 5'
21+
- cron: "19 2 * * 5"
2222

2323
jobs:
2424
analyze:
@@ -32,39 +32,39 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
language: [ 'csharp' ]
35+
language: ["csharp"]
3636
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
3737
# Learn more about CodeQL language support at https://git.io/codeql-language-support
3838

3939
steps:
40-
- name: Checkout repository
41-
uses: actions/checkout@v2
40+
- name: Checkout repository
41+
uses: actions/checkout@v2
4242

43-
# Initializes the CodeQL tools for scanning.
44-
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v1
46-
with:
47-
languages: ${{ matrix.language }}
48-
# If you wish to specify custom queries, you can do so here or in a config file.
49-
# By default, queries listed here will override any specified in a config file.
50-
# Prefix the list here with "+" to use these queries and those in the config file.
51-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v1
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5252

53-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54-
# If this step fails, then you should remove it and run the build manually (see below)
55-
- name: Autobuild
56-
uses: github/codeql-action/autobuild@v1
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@v1
5757

58-
# ℹ️ Command-line programs to run using the OS shell.
59-
# 📚 https://git.io/JvXDl
58+
# ℹ️ Command-line programs to run using the OS shell.
59+
# 📚 https://git.io/JvXDl
6060

61-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62-
# and modify them (or add more) to build your code if your project
63-
# uses a compiled language
61+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62+
# and modify them (or add more) to build your code if your project
63+
# uses a compiled language
6464

65-
#- run: |
66-
# make bootstrap
67-
# make release
65+
#- run: |
66+
# make bootstrap
67+
# make release
6868

69-
- name: Perform CodeQL Analysis
70-
uses: github/codeql-action/analyze@v1
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@v1

Diff for: .github/workflows/main.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ name: CI
55
on:
66
# Triggers the workflow on push or pull request events but only for the master branch
77
push:
8-
branches: [ master ]
8+
branches: [main, develop, master]
9+
pull_request:
10+
branches: [main, develop, master]
911

1012
# Allows you to run this workflow manually from the Actions tab
1113
workflow_dispatch:
@@ -21,37 +23,36 @@ jobs:
2123
steps:
2224
- name: Check Commit and Install 7Zip PowerShell Module
2325
shell: powershell
24-
26+
2527
run: |
2628
# cancel early, if not build commit
2729
$strVal ='${{ github.event.commits[0].message }}'
2830
# Convert commit message to a single line if multiline
2931
$singleLineStrVal = $strVal -replace "`r`n", " " -replace "`n", " "
30-
if($singleLineStrVal -match '#GITBUILD')
32+
if($singleLineStrVal -match '#GITBUILD')
3133
{
3234
Write-Host 'True'
3335
} else {
3436
Write-Host 'False'
3537
exit(1)
3638
}
37-
Install-Module 7Zip4PowerShell -Force -Verbose
39+
Install-Module 7Zip4PowerShell -Force -Verbose
3840
- uses: actions/checkout@v2
39-
4041
- name: Restore NuGet packages
4142
run: nuget restore UnityLauncherPro.sln
42-
43+
4344
- name: Build Binary
4445
shell: cmd
45-
run: call .\Build.cmd
46-
46+
run: call .\Build.cmd
47+
4748
- name: Build Artifact
4849
shell: cmd
4950
run: call .\ArtifactBuild.cmd
5051

5152
- name: Get current date and time
5253
id: datetime
5354
run: echo "::set-output name=current_datetime::$(date +'%d/%m/%Y %H:%M')"
54-
55+
5556
- name: Create Release
5657
id: create_release
5758
uses: actions/create-release@latest
@@ -63,8 +64,8 @@ jobs:
6364
body: |
6465
Automated Release by GitHub Action CI
6566
draft: false
66-
prerelease: false
67-
67+
prerelease: false
68+
6869
- name: Upload Release Asset
6970
id: upload-release-asset
7071
uses: actions/upload-release-asset@v1
@@ -75,4 +76,3 @@ jobs:
7576
asset_path: ./UnityLauncherPro.zip
7677
asset_name: UnityLauncherPro.zip
7778
asset_content_type: application/zip
78-

0 commit comments

Comments
 (0)