forked from baidu/starlight
-
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
b741ccd
commit 6cb4583
Showing
5 changed files
with
228 additions
and
236 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 |
---|---|---|
@@ -1,58 +1,51 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "main" ] | ||
schedule: | ||
- cron: '26 21 * * 1' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
runs-on: self-hosted | ||
steps: | ||
- continue-on-error: true | ||
name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- continue-on-error: true | ||
name: Setup Java JDK and Maven | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: '8' | ||
- continue-on-error: true | ||
name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
- continue-on-error: true | ||
name: Cache local Maven repository | ||
uses: actions/cache@v3 | ||
with: | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
path: ~/.m2/repository | ||
restore-keys: '${{ runner.os }}-maven- | ||
' | ||
- continue-on-error: true | ||
name: Build | ||
run: "mvn -B clean package -Dmaven.test.skip --file starlight/pom.xml --no-transfer-progress\ | ||
\ \nmvn -B clean package -Dmaven.test.skip --file spring-cloud-starter-baidu-starlight/pom.xml\ | ||
\ --no-transfer-progress\n" | ||
- continue-on-error: true | ||
name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: /language:${{matrix.language}} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'java' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Java JDK and Maven | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '8' | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: Cache local Maven repository | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Build | ||
run: | | ||
mvn -B clean package -Dmaven.test.skip --file starlight/pom.xml --no-transfer-progress | ||
mvn -B clean package -Dmaven.test.skip --file spring-cloud-starter-baidu-starlight/pom.xml --no-transfer-progress | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:${{matrix.language}}" | ||
language: | ||
- java | ||
name: CodeQL | ||
on: | ||
repository_dispatch: | ||
types: trigger-ga___codeql-analysis.yml |
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 |
---|---|---|
@@ -1,45 +1,51 @@ | ||
name: Snapshot | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
- continue-on-error: true | ||
name: Checkout project | ||
uses: actions/checkout@v3 | ||
- continue-on-error: true | ||
name: Setup Java JDK and Maven | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
gpg-private-key: ${{ secrets.GPG_SECRET }} | ||
java-version: '8' | ||
server-id: ossrh | ||
server-password: MAVEN_PASSWORD | ||
server-username: MAVEN_USERNAME | ||
- continue-on-error: true | ||
name: Configure Git user | ||
run: 'git config user.email "[email protected]" | ||
- name: Setup Java JDK and Maven | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '8' | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
gpg-private-key: ${{ secrets.GPG_SECRET }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
git config user.name "GitHub Actions" | ||
- name: Configure Git user | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "GitHub Actions" | ||
' | ||
- continue-on-error: true | ||
name: Cache local Maven repository | ||
uses: actions/cache@v3 | ||
with: | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
path: ~/.m2/repository | ||
restore-keys: '${{ runner.os }}-maven- | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
' | ||
- continue-on-error: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSWD }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWD }} | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }} | ||
name: Publish Snaphot package | ||
run: 'mvn -B deploy -P deploy -Dmaven.test.skip --file starlight/pom.xml --no-transfer-progress | ||
- name: Publish Snaphot package | ||
run: | | ||
mvn -B deploy -P deploy -Dmaven.test.skip --file starlight/pom.xml --no-transfer-progress | ||
mvn -B deploy -P deploy -Dmaven.test.skip --file spring-cloud-starter-baidu-starlight/pom.xml --no-transfer-progress | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSWD }} | ||
mvn -B deploy -P deploy -Dmaven.test.skip --file spring-cloud-starter-baidu-starlight/pom.xml | ||
--no-transfer-progress | ||
' | ||
name: Snapshot | ||
on: | ||
repository_dispatch: | ||
types: trigger-ga___snapshot.yml |
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 |
---|---|---|
@@ -1,67 +1,65 @@ | ||
name: Starlight Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
releaseVersion: | ||
description: "Default version to use when preparing a release." | ||
required: true | ||
default: "X.Y.Z" | ||
developmentVersion: | ||
description: "Default version to use for new local working copy." | ||
required: true | ||
default: "X.Y.Z-SNAPSHOT" | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
- continue-on-error: true | ||
name: Checkout project | ||
uses: actions/checkout@v3 | ||
- continue-on-error: true | ||
name: Setup Java JDK and Maven | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
gpg-private-key: ${{ secrets.GPG_SECRET }} | ||
java-version: '8' | ||
server-id: ossrh | ||
server-password: MAVEN_PASSWORD | ||
server-username: MAVEN_USERNAME | ||
- continue-on-error: true | ||
name: Configure Git user | ||
run: 'git config user.email "[email protected]" | ||
git config user.name "GitHub Actions" | ||
- name: Setup Java JDK and Maven | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '8' | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
gpg-private-key: ${{ secrets.GPG_SECRET }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
' | ||
- continue-on-error: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSWD }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWD }} | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }} | ||
name: Publish package | ||
run: 'cd starlight | ||
- name: Configure Git user | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "GitHub Actions" | ||
mvn -B release:prepare release:perform -P deploy -Darguments="-Dmaven.test.skip" | ||
-DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ | ||
github.event.inputs.developmentVersion }} --no-transfer-progress | ||
- name: Publish package | ||
run: | | ||
cd starlight | ||
mvn -B release:prepare release:perform -P deploy -Darguments="-Dmaven.test.skip" -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }} --no-transfer-progress | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSWD }} | ||
' | ||
- continue-on-error: true | ||
id: changelog | ||
name: Generate changelog | ||
uses: metcalfc/[email protected] | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
- continue-on-error: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
id: create_release | ||
name: Create GitHub Release | ||
uses: actions/create-release@v1 | ||
with: | ||
body: '### Things that changed in this release | ||
- name: Generate changelog | ||
id: changelog | ||
uses: metcalfc/[email protected] | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
${{ steps.changelog.outputs.changelog }} | ||
- name: Create GitHub Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: starlight-v${{ github.event.inputs.releaseVersion }} | ||
release_name: starlight-v${{ github.event.inputs.releaseVersion }} | ||
body: | | ||
### Things that changed in this release | ||
${{ steps.changelog.outputs.changelog }} | ||
draft: true | ||
prerelease: false | ||
' | ||
draft: true | ||
prerelease: false | ||
release_name: starlight-v${{ github.event.inputs.releaseVersion }} | ||
tag_name: starlight-v${{ github.event.inputs.releaseVersion }} | ||
name: Starlight Release | ||
on: | ||
repository_dispatch: | ||
types: trigger-ga___starlight-release.yml |
Oops, something went wrong.