Skip to content

Commit

Permalink
ci: separate branch run from release run
Browse files Browse the repository at this point in the history
  • Loading branch information
brenoepics committed May 16, 2024
1 parent 639c0c4 commit d61eea0
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 79 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ name: Check Transpiled JavaScript

on:
pull_request:
branches:
- main
branches: [main, dev]
push:
branches:
- main
branches: [main, dev]

permissions:
contents: read
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- dev
branches: [main, dev]

jobs:
test-typescript:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/prp-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Run PRP Preprocessor

on:
workflow_dispatch:
push:
branches: [dev]
permissions:
contents: write

jobs:
test-action:
runs-on: ubuntu-latest
name: Test action
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Process files
uses: ./ # Uses an action in the root directory
id: process
with:
ignoredDirs: 'example/**'
env:
prpTitle: 'prp-preprocessor'
alertMessage: |-
> [!IMPORTANT]
> This file was generated from a .prp
currentVersion: ${{ github.ref_name }}
11 changes: 5 additions & 6 deletions .github/workflows/prp.yml → .github/workflows/prp-release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Run PRP
name: Run PRP Release Preprocessor

on:
workflow_dispatch:
release:
types: [created]
workflow_dispatch:
push:
branches: [ main, dev ]

permissions:
contents: write
Expand All @@ -17,15 +15,16 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: "main"
- name: Process files
uses: ./ # Uses an action in the root directory
id: process
with:
rootDir: '.'
ignoredDirs: 'example/**'
env:
prpTitle: 'prp-preprocessor'
alertMessage: |-
> [!IMPORTANT]
> This file was generated from a .prp
currentVersion: ${{ github.ref_name }}
currentVersion: ${{ github.event.release.tag_name }}
6 changes: 2 additions & 4 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ name: SonarCloud analysis
on:
workflow_dispatch:
pull_request:
branches:
- main
branches: [main, dev]
push:
branches:
- main
branches: [main, dev]

permissions:
contents: write
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32079,6 +32079,7 @@ exports.run = run;
* @param {SimpleGit} git - The git instance.
* @param {InputParams} inputParams - The input parameters for the action.
* @param {string} commitMessage - The commit message.
* @throws {Error} Throws an error if the changes cannot be pushed.
* @returns {void} Resolves when the changes are pushed.
*/
async function pushChanges(git, inputParams, commitMessage) {
Expand All @@ -32099,8 +32100,7 @@ async function pushChanges(git, inputParams, commitMessage) {
return;
}
core.error(`Error committing files!`);
if (err instanceof Error)
core.error(err.message);
throw err;
});
}
exports.pushChanges = pushChanges;
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

59 changes: 0 additions & 59 deletions script/release

This file was deleted.

0 comments on commit d61eea0

Please sign in to comment.