Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare to 1.0.0 #10

Merged
merged 4 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"features": {
"ghcr.io/dhoeric/features/act:1": {}
},
"postCreateCommand": "pnpm install",
"customizations": {
"vscode": {
"extensions": [
"cschleiden.vscode-github-actions",
"github.vscode-github-actions",
"redhat.vscode-yaml"
]
}
Expand Down
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
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"recommendations": [
"cschleiden.vscode-github-actions",
"github.vscode-github-actions",
"redhat.vscode-yaml"
]
}
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.

3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export async function run(inputParams: InputParams): Promise<void> {
* @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.
*/
export async function pushChanges(
Expand Down Expand Up @@ -85,7 +86,7 @@ export async function pushChanges(
return;
}
core.error(`Error committing files!`);
if (err instanceof Error) core.error(err.message);
throw err;
}
);
}