Skip to content

Commit

Permalink
Merge pull request #6 from vincejv/fix-workflow-for-main
Browse files Browse the repository at this point in the history
Update workflows
  • Loading branch information
vincejv authored Oct 14, 2022
2 parents 0b21a27 + d04a5a9 commit b5a3572
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 27 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/package-release-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,25 @@ on:
- main

jobs:
pre_job:
name: Duplicate checks
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
paths_result: ${{ steps.skip_check.outputs.paths_result }}
steps:
- name: Skip duplicate actions
id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: same_content_newer
cancel_others: true
deploy:
name: Release artifact
runs-on: ubuntu-latest
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
permissions:
contents: read
packages: write
Expand Down
41 changes: 39 additions & 2 deletions .github/workflows/package-release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,56 @@ name: Github Packages release for Production

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

jobs:
pre_job:
name: Duplicate checks
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
paths_result: ${{ steps.skip_check.outputs.paths_result }}
steps:
- name: Skip duplicate actions
id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: same_content_newer
cancel_others: true
versioning:
name: Versioning
runs-on: ubuntu-latest
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
deploy:
name: Release artifact
runs-on: ubuntu-latest
needs: versioning
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: main
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/prepare-release-main.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,29 @@ on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
pull-requests: read # allows SonarCloud to decorate PRs with analysis results

jobs:
pre_job:
name: Duplicate checks
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
paths_result: ${{ steps.skip_check.outputs.paths_result }}
steps:
- name: Skip duplicate actions
id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: same_content_newer
cancel_others: true
build:
name: Build
runs-on: ubuntu-latest
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down

0 comments on commit b5a3572

Please sign in to comment.