Skip to content

Commit

Permalink
Github Action fixes release ignore (#53)
Browse files Browse the repository at this point in the history
* Github actions fixes

Co-authored-by: aman.kapoor <[email protected]>
  • Loading branch information
amank22 and amankgo authored Jan 14, 2022
1 parent 1661d5f commit 24113b7
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 10 deletions.
5 changes: 4 additions & 1 deletion .github/config/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
],
"exclude_merge_branches": [
"merge pull request",
"Merge pull request"
"Merge pull request",
"Restyle ",
"from CodeFactor",
"release ignore"
]
}
10 changes: 1 addition & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ on:
- 'docs/**'
- '.github/config/labels.yml'

pull_request:
branches:
- main

workflow_dispatch:
repository_dispatch:
types: [ app-release ]
Expand All @@ -30,7 +26,7 @@ jobs:
name: Build Package
timeout-minutes: 15
continue-on-error: false
# if: github.event_name == 'pull_request'
if: github.event.base_ref == 'refs/heads/main'

runs-on: ${{ matrix.os }}
environment: Production
Expand Down Expand Up @@ -116,10 +112,6 @@ jobs:
with:
fetch-depth: 0

- uses: ffurrer2/[email protected]
id: extract_release_notes
if: ${{ false }}

- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v2
Expand Down
92 changes: 92 additions & 0 deletions .github/workflows/buildPreProd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Logvue Build

env:
GITHUB_DEPLOY: 'false'

on:
pull_request:
branches:
- main
- rel_*
paths-ignore:
- LICENSE
- README.md
- 'docs/**'
- '.github/config/labels.yml'

workflow_dispatch:
repository_dispatch:
types: [ app-release ]

defaults:
run:
shell: bash

jobs:
build:
name: Build Package
timeout-minutes: 15
continue-on-error: false
# if: github.event_name == 'pull_request'

runs-on: ${{ matrix.os }}
environment: PreProd
env:
SENTRY_ENDPOINT: ${{ secrets.SENTRY_ENDPOINT }}
SENTRY_DEBUG: ${{ secrets.SENTRY_DEBUG }}
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
jdk: [ 18 ]

steps:
- name: Check out the source code
uses: actions/checkout@v2

- name: Download ${{ matrix.os }} OpenJDK ${{ matrix.jdk }}
id: download-jdk
uses: sormuras/download-jdk@v1
with:
feature: ${{ matrix.jdk }}

- name: Set up OpenJDK ${{ matrix.jdk }}
id: setup-java
uses: actions/setup-java@v2
if: always() && steps.download-jdk.outcome == 'success'
with:
distribution: jdkfile
java-version: ${{ env.JDK_VERSION }}
jdkFile: ${{ env.JDK_FILE }}

- name: Cache Gradle dependencies
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Gradle Build
id: gradle-build
run: ./gradlew package -PSENTRY_ENDPOINT=${{ env.SENTRY_ENDPOINT }}

- name: Uploading ${{ matrix.os }} uber jar
if: steps.gradle-build.outcome == 'success'
uses: actions/upload-artifact@v2
with:
name: ${{ steps.gradle-build.outputs.uber_jar_name }}
path: |
${{ steps.gradle-build.outputs.uber_jar_path }}
if-no-files-found: error

- name: Uploading ${{ matrix.os }} native package
if: steps.gradle-build.outcome == 'success'
uses: actions/upload-artifact@v2
with:
name: ${{ steps.gradle-build.outputs.app_pkg_name }}
path: |
${{ steps.gradle-build.outputs.app_pkg_path }}
if-no-files-found: error

0 comments on commit 24113b7

Please sign in to comment.