Skip to content

Commit e9d1732

Browse files
build: v0.2.2 release [macata #48]
build: v0.2.2 release [macata #48]
2 parents fbe4cbc + ccbf5de commit e9d1732

File tree

19 files changed

+241
-35
lines changed

19 files changed

+241
-35
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Attach binary to release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
tag_and_release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
13+
- name: Set up JDK 18
14+
uses: actions/setup-java@v3
15+
with:
16+
java-version: '18'
17+
distribution: 'adopt'
18+
cache: maven
19+
20+
- name: Cache local Maven repository
21+
uses: actions/cache@v3
22+
with:
23+
path: ~/.m2/repository
24+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
25+
restore-keys: |
26+
${{ runner.os }}-maven-
27+
28+
- name: Build with Maven
29+
run: mvn package
30+
31+
- name: Extract Version from POM
32+
id: extract_version
33+
run: echo ::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
34+
35+
- name: Upload Release Asset
36+
id: upload-release-asset
37+
uses: actions/upload-release-asset@v1
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
with:
41+
upload_url: ${{ github.event.release.upload_url }}
42+
asset_path: ./target/macatalauncher-${{ steps.extract_version.outputs.version }}.jar
43+
asset_name: macatalauncher-${{ steps.extract_version.outputs.version }}.jar
44+
asset_content_type: application/java-archive

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Java CI
1+
name: Java build & test
22

33
on: [push]
44

.github/workflows/codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: CodeQL analysis
2+
13
on:
24
push:
35
branches: [ master, develop ]

.github/workflows/commitlint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Run Commitlint on PR's commits
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
run-commitlint-on-pr:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: '16'
18+
19+
- name: Install Commitlint
20+
run: npm install --save-dev @commitlint/{cli,config-conventional}
21+
22+
- name: Validate all commits from PR using Commitlint
23+
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

.github/workflows/prtitlelint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Run Commitlint on PR's title
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, reopened, synchronize]
6+
7+
8+
jobs:
9+
run-commitlint-on-pr:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: '16'
20+
21+
- name: Install Commitlint
22+
run: npm install --save-dev @commitlint/{cli,config-conventional}
23+
24+
- name: Validate PR title using Commitlint
25+
run: echo ${{ github.event.pull_request.title }} | npx commitlint

.github/workflows/sonarcloud.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: SonarCloud
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
11+
jobs:
12+
build:
13+
name: Build and analyze
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
19+
- name: Set up JDK 18
20+
uses: actions/setup-java@v3
21+
with:
22+
java-version: '18'
23+
distribution: 'adopt'
24+
cache: maven
25+
- name: Cache local Maven repository
26+
uses: actions/cache@v3
27+
with:
28+
path: ~/.m2/repository
29+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
30+
restore-keys: |
31+
${{ runner.os }}-maven-
32+
- name: Cache SonarCloud packages
33+
uses: actions/cache@v3
34+
with:
35+
path: ~/.sonar/cache
36+
key: ${{ runner.os }}-sonar
37+
restore-keys: ${{ runner.os }}-sonar
38+
- name: Build and analyze
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
41+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
42+
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=dazednconfused_macata-launcher

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,10 @@ backups
4343
.macatalauncher
4444
trashed
4545
userdir
46-
mods
46+
mods
47+
48+
### Husky / CommitLint ###
49+
node_modules
50+
package-lock.json
51+
package.json
52+
yarn.lock

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no-install commitlint --edit "$1"

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@
2121
![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/DazedNConfused-/macata-launcher/build.yml?branch=master&label=master)
2222
![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/DazedNConfused-/macata-launcher/build.yml?branch=develop&label=develop)
2323

24+
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=dazednconfused_macata-launcher&metric=bugs)](https://sonarcloud.io/dashboard?id=dazednconfused_macata-launcher)
25+
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=dazednconfused_macata-launcher&metric=code_smells)](https://sonarcloud.io/dashboard?id=dazednconfused_macata-launcher)
26+
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=dazednconfused_macata-launcher&metric=coverage)](https://sonarcloud.io/dashboard?id=dazednconfused_macata-launcher)
27+
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=dazednconfused_macata-launcher&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=dazednconfused_macata-launcher)
28+
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=dazednconfused_macata-launcher&metric=ncloc)](https://sonarcloud.io/dashboard?id=dazednconfused_macata-launcher)
29+
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=dazednconfused_macata-launcher&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=dazednconfused_macata-launcher)
30+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=dazednconfused_macata-launcher&metric=alert_status)](https://sonarcloud.io/dashboard?id=dazednconfused_macata-launcher)
31+
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=dazednconfused_macata-launcher&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=dazednconfused_macata-launcher)
32+
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=dazednconfused_macata-launcher&metric=security_rating)](https://sonarcloud.io/dashboard?id=dazednconfused_macata-launcher)
33+
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=dazednconfused_macata-launcher&metric=sqale_index)](https://sonarcloud.io/dashboard?id=dazednconfused_macata-launcher)
34+
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=dazednconfused_macata-launcher&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=dazednconfused_macata-launcher)
35+
2436
## Requirements
2537

2638
MaCata requires Java 11 to run.
@@ -29,6 +41,16 @@ MaCata requires Java 11 to run.
2941

3042
Just put the `macatalauncher.jar` in some folder of your choice and double click!
3143

44+
## Build
45+
46+
Just run `mvn package` and a `macatalauncher-x.x.x.jar` binary will be built in the `target` directory.
47+
48+
## Development
49+
50+
Before making changes to the codebase, installing `husky` is encouraged: https://typicode.github.io/husky/get-started.html
51+
52+
While not mandatory, if commits are not properly formatted, they may get rejected by GitHub's `commitlint` action.
53+
3254
## Features
3355

3456
### Current
@@ -55,10 +77,6 @@ Just put the `macatalauncher.jar` in some folder of your choice and double click
5577
- I want to focus mainly on macOS since there are already some excellent launchers for Windows and Linux already.
5678
- Having said that, given the current launcher architecture, I would like to think it wouldn't be terribly hard to support Linux and/or Windows. Just a couple of changes to the [launcher class](src/main/java/com/dazednconfused/catalauncher/launcher/CDDALauncherManager.java) maybe? PRs welcome!
5779

58-
## Build
59-
60-
Just run `mvn package` and a `macatalauncher-x.x.x.jar` binary will be built in the `target` directory.
61-
6280
## FAQ
6381

6482
### Why Yet Another Launcher?

0 commit comments

Comments
 (0)