Skip to content

Commit

Permalink
ci: pr builds improved
Browse files Browse the repository at this point in the history
  • Loading branch information
driver733 committed May 12, 2020
1 parent 522e660 commit 0b83883
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 31 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Branch

on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- run: chmod +x gradlew
- run: ./gradlew build --no-daemon
25 changes: 0 additions & 25 deletions .github/workflows/build.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Pull Request

on: [pull_request]

jobs:
build-merge-result:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/setup-java@v1
with:
java-version: 11
- uses: actions/checkout@v2
with:
ref: master
fetch-depth: 0
- name: Merge with base branch
run: |
git fetch origin +refs/heads/${{ github.head_ref }}:refs/remotes/origin/${{ github.head_ref }} --no-tags
git checkout ${{ github.head_ref }}
git checkout ${{ github.base_ref }}
git merge ${{ github.head_ref }}
- run: npm i
- run: chmod +x gradlew
- run: ./gradlew build --no-daemon
- run: npx semantic-release --dry-run --no-ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59 changes: 53 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{
"type": "docs",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
Expand All @@ -30,6 +25,59 @@
"release": "patch"
}
],
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "feature",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "style",
"section": "Styles"
},
{
"type": "chore",
"section": "Miscellaneous Chores"
},
{
"type": "refactor",
"section": "Code Refactoring"
},
{
"type": "test",
"section": "Tests"
},
{
"type": "build",
"section": "Build System"
},
{
"type": "ci",
"section": "Continuous Integration"
}
]
},
"parserOpts": {
"noteKeywords": [
"BREAKING CHANGE",
Expand All @@ -40,7 +88,6 @@
],
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/github",
[
"@semantic-release/git",
{
Expand Down

0 comments on commit 0b83883

Please sign in to comment.