Skip to content

Commit

Permalink
Merge pull request #41 from RaceAssist/refactor-github-actions
Browse files Browse the repository at this point in the history
Change github actions
  • Loading branch information
Nlkomaru authored Jan 6, 2024
2 parents 6af1317 + 0c55f95 commit 4f4e616
Show file tree
Hide file tree
Showing 128 changed files with 1,916 additions and 1,335 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "daily"
101 changes: 53 additions & 48 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,53 @@
name-template: 'Release v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
template: |
# What's Changed
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
categories:
- title: '💥 Breaking'
label:
- 'type: breaking'
- title: '🎉 Features'
labels:
- 'type: enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'type: bug'
- title: '📝 Documentation updates'
labels:
- 'type: docs'
- title: '✅ Maintenance'
labels:
- 'type: maintenance'
- title: '🆙 Dependency updates'
labels:
- 'type: dependencies'
collapse-after: 5
- title: '👍 Other changes'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
version-resolver:
major:
labels:
- 'major'
- 'type: breaking'
minor:
labels:
- 'minor'
- 'type: feature'
patch:
labels:
- 'patch'
- 'type: bug'
- 'type: maintenance'
- 'type: docs'
- 'type: dependencies'
default: patch
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '⬆️ Dependencies'
collapse-after: 3
labels:
- 'dependencies'
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
exclude-labels:
- 'skip-changelog'
autolabeler:
- label: 'documentation'
files:
- '*.md'
branch:
- '/docs{0,1}\/.+/'
- label: 'bug'
branch:
- '/fix\/.+/'
title:
- '/fix/i'
- label: 'enhancement'
branch:
- '/feature\/.+/'
body:
- '/JIRA-[0-9]{1,4}/'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes
$CHANGES
54 changes: 0 additions & 54 deletions .github/workflows/build_and_deploy.yml

This file was deleted.

20 changes: 17 additions & 3 deletions .github/workflows/check_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@ name: Check pull request

on: [ pull_request ]


permissions:
statuses: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Set commit status as pending
uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
context: Check pull request
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
Expand All @@ -16,7 +26,11 @@ jobs:
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew build
- uses: ouzi-dev/[email protected]
run: ./gradlew build -x test
- name: Set final commit status
uses: myrotvorets/set-commit-status-action@master
if: always()
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
context: Check pull request
59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release Drafter

on:
push:
branches:
- master

permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
permissions:
contents: write
pull-requests: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'

- name: Change wrapper permissions
run: chmod +x ./gradlew

- name : Publish dokka docs
run: ./gradlew dokkaHtml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'build/dokka/html'

- uses: release-drafter/release-drafter@v5
id: release-drafter
with:
publish: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: upload_release

on:
release:
types: [ published ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'

- name: Change wrapper permissions
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew build -x test

- name: Upload release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/libs/RaceAssist-1.0-SNAPSHOT-all.jar
asset_name: RaceAssist_${{ github.event.release.tag_name }}.jar
asset_content_type: application/jar


1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ hs_err_pid*
replay_pid*

run/

Loading

0 comments on commit 4f4e616

Please sign in to comment.