Skip to content

Commit

Permalink
Update GitHub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
NorseDreki committed Apr 26, 2024
1 parent fb5df45 commit ead257a
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 172 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build

on:
workflow_call:
pull_request:

permissions:
contents: write


env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"

jobs:
build:
runs-on: ubuntu-latest #add macos

steps:
- uses: actions/checkout@v4

- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

# make sure ncurses is installed
- name: Build with Gradle
run: ./gradlew assemble

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: build/bin/**/*
15 changes: 0 additions & 15 deletions .github/workflows/check-commit-message.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/workflows/check-formatting.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: Check formatting

on:
push:
tags:
- v*
branches:
- main
pull_request:

permissions:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Check PR title"
name: "Check semantics of PR title and commits"

on:
pull_request_target:
Expand All @@ -9,12 +9,19 @@ on:

permissions:
pull-requests: read
contents: read

jobs:
main:
name: Check PR title
check-pr-title:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

check-commit-message:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: wagoid/commitlint-github-action@v6
79 changes: 0 additions & 79 deletions .github/workflows/main.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .github/workflows/release-snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Build and Release Snap

on:
workflow_call:
secrets:
snap:
required: false
workflow_dispatch:

jobs:
Expand Down
40 changes: 21 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,63 @@
name: build and publish
name: Release

on:
push:
#branches: [ main ]
tags:
- '*'

env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"

jobs:
checkGradleWrapper:
check-gradle-wrapper:
uses: NorseDreki/dogcat/.github/workflows/check-gradle-wrapper.yml@main

build:
needs: checkGradleWrapper
release-notes:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with Gradle
run: ./gradlew assemble

- name: Extract release notes
id: release_notes
uses: ffurrer2/extract-release-notes@v2
with:
release_notes_file: RELEASE_NOTES.md

releaseBrew:
- name: Upload release notes
uses: actions/upload-artifact@v4
with:
name: release-notes
path: RELEASE_NOTES.md

build:
needs: check-gradle-wrapper
uses: NorseDreki/dogcat/.github/workflows/build.yml@main

release-brew:
needs: build
uses: NorseDreki/dogcat/.github/workflows/release-brew.yml@main
secrets: inherit

releaseSnap:
release-snap:
needs: build
uses: NorseDreki/dogcat/.github/workflows/release-snap.yml@main
secrets: inherit

createRelease:
needs: [ checkGradleWrapper ]
needs: [ build, release-notes, release-brew, release-snap ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download release notes
uses: actions/download-artifact@v4
with:
name: release-notes

- name: Create Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
body: 'some body for release лрпрп'
body_path: release-notes/RELEASE_NOTES.md
draft: false
prerelease: false
files: |
CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
48 changes: 0 additions & 48 deletions .github/workflows/test-arm64.yml

This file was deleted.

0 comments on commit ead257a

Please sign in to comment.