mirror of
https://github.com/s4u/maven-settings-action.git
synced 2026-02-12 00:05:49 +08:00
Merge remote-tracking branch 'origin/master' into releases/v2
This commit is contained in:
40
.github/release-drafter.yml
vendored
40
.github/release-drafter.yml
vendored
@ -1,40 +0,0 @@
|
||||
categories:
|
||||
|
||||
- title: 'New features'
|
||||
labels:
|
||||
- 'enhancement'
|
||||
|
||||
- title: 'Bug Fixes'
|
||||
labels:
|
||||
- 'bug'
|
||||
|
||||
- title: 'Maintenance'
|
||||
labels:
|
||||
- 'code quality'
|
||||
- 'documentation'
|
||||
|
||||
- title: 'Dependency updates'
|
||||
labels:
|
||||
- 'dependencies'
|
||||
|
||||
change-template: '- $TITLE #$NUMBER'
|
||||
|
||||
sort-direction: 'ascending'
|
||||
|
||||
template: |
|
||||
# What's Changed
|
||||
|
||||
$CHANGES
|
||||
|
||||
# Thanks
|
||||
Many thanks for collaboration on this release for: $CONTRIBUTORS
|
||||
|
||||
replacers:
|
||||
- search: '/(?:and )?@dependabot-preview(?:\[bot\])?,?/g'
|
||||
replace: ''
|
||||
|
||||
- search: '/(?:and )?@dependabot(?:\[bot\])?,?/g'
|
||||
replace: ''
|
||||
|
||||
- search: '/(?:and )?Github Action(?:\[bot\])?,?/g'
|
||||
replace: ''
|
||||
2
.github/workflows/audit.yml
vendored
2
.github/workflows/audit.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
|
||||
- uses: actions/setup-node@v2.1.5
|
||||
- uses: actions/setup-node@v2.4.0
|
||||
with:
|
||||
node-version: '12.x'
|
||||
|
||||
|
||||
25
.github/workflows/auto-approve.yml
vendored
Normal file
25
.github/workflows/auto-approve.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
name: Auto approve
|
||||
|
||||
on:
|
||||
pull_request_target
|
||||
|
||||
jobs:
|
||||
auto-approve:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: alexwilson/enable-github-automerge-action@1.0.0
|
||||
if: >
|
||||
github.actor == 'dependabot[bot]'
|
||||
|| github.actor == 'dependabot-preview[bot]'
|
||||
with:
|
||||
merge-method: "REBASE"
|
||||
github-token: "${{ secrets.TECH_TOKEN }}"
|
||||
|
||||
- uses: hmarr/auto-approve-action@v2.1.0
|
||||
if: >
|
||||
github.actor == 'dependabot[bot]'
|
||||
|| github.actor == 'dependabot-preview[bot]'
|
||||
|| github.actor == 'slawekjaranowski'
|
||||
with:
|
||||
github-token: "${{ secrets.TECH_TOKEN }}"
|
||||
4
.github/workflows/release-drafter.yml
vendored
4
.github/workflows/release-drafter.yml
vendored
@ -9,11 +9,13 @@ jobs:
|
||||
update_release_draft:
|
||||
name: Update Release Draft
|
||||
runs-on: ubuntu-latest
|
||||
concurrency: release-drafter
|
||||
|
||||
if: >
|
||||
github.repository_owner == 's4u'
|
||||
&& !startsWith(github.event.head_commit.message , '[maven-release-plugin]')
|
||||
|
||||
steps:
|
||||
- uses: release-drafter/release-drafter@v5.14.0
|
||||
- uses: release-drafter/release-drafter@v5.15.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@ -19,13 +19,15 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
|
||||
- uses: actions/setup-node@v2.1.5
|
||||
- uses: actions/setup-node@v2.4.0
|
||||
with:
|
||||
node-version: '12.x'
|
||||
|
||||
- uses: actions/setup-java@v1
|
||||
- uses: actions/setup-java@v2.2.0
|
||||
with:
|
||||
java-version: '1.8'
|
||||
distribution: 'adopt'
|
||||
java-version: '8'
|
||||
|
||||
|
||||
- run: npm version
|
||||
- run: npm ci
|
||||
|
||||
34
README.md
34
README.md
@ -3,7 +3,7 @@
|
||||
[](https://github.com/s4u/maven-settings-action/actions?query=workflow%3AAudit)
|
||||
|
||||
|
||||
This action setup maven environment for use in action by:
|
||||
This action sets up Maven environments for use in GitHub Actions by:
|
||||
- create maven settings.xml
|
||||
- set ```interactiveMode``` to false - useful in CI system
|
||||
- after job finish generated settings.xml will be removed to prevent cache or left sensitive data on build system
|
||||
@ -12,10 +12,10 @@ This action setup maven environment for use in action by:
|
||||
# Contributions
|
||||
- Contributions are welcome!
|
||||
- Give :star: - if you want to encourage me to work on a project
|
||||
- Don't hesitate create issue for new feature you dream of or if you suspect some bug
|
||||
- Don't hesitate to create issues for new features you dream of or if you suspect some bug
|
||||
|
||||
# Project versioning
|
||||
Project use [Semantic Versioning](https://semver.org/).
|
||||
This project uses [Semantic Versioning](https://semver.org/).
|
||||
We recommended to use the latest and specific release version.
|
||||
|
||||
In order to keep your project dependencies up to date you can watch this repository *(Releases only)*
|
||||
@ -28,14 +28,14 @@ See [action.yml](action.yml)
|
||||
## default ```settings.xml```
|
||||
```yml
|
||||
steps:
|
||||
- uses: s4u/maven-settings-action@v2.4.0
|
||||
- uses: s4u/maven-settings-action@v2.4.1
|
||||
```
|
||||
|
||||
## ```settings.xml``` with servers section
|
||||
|
||||
```yml
|
||||
steps:
|
||||
- uses: s4u/maven-settings-action@v2.4.0
|
||||
- uses: s4u/maven-settings-action@v2.4.1
|
||||
with:
|
||||
servers: '[{"id": "serverId", "username": "username", "password": "password"}]'
|
||||
```
|
||||
@ -56,7 +56,7 @@ Please refer to the [servers](http://maven.apache.org/settings.html#Servers) doc
|
||||
|
||||
``` yml
|
||||
steps:
|
||||
- uses: s4u/maven-settings-action@v2.4.0
|
||||
- uses: s4u/maven-settings-action@v2.4.1
|
||||
with:
|
||||
servers: |
|
||||
[{
|
||||
@ -90,7 +90,7 @@ result will be:
|
||||
## ```settings.xml``` with mirrors section
|
||||
```yml
|
||||
steps:
|
||||
- uses: s4u/maven-settings-action@v2.4.0
|
||||
- uses: s4u/maven-settings-action@v2.4.1
|
||||
with:
|
||||
mirrors: '[{"id": "mirrorId", "name": "mirrorName", "mirrorOf": "mirrorOf", "url": "mirrorUrl"}]'
|
||||
```
|
||||
@ -98,7 +98,7 @@ steps:
|
||||
## ```settings.xml``` with properties
|
||||
```yml
|
||||
steps:
|
||||
- uses: s4u/maven-settings-action@v2.4.0
|
||||
- uses: s4u/maven-settings-action@v2.4.1
|
||||
with:
|
||||
properties: '[{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'
|
||||
```
|
||||
@ -107,7 +107,7 @@ steps:
|
||||
|
||||
```yml
|
||||
steps:
|
||||
- uses: s4u/maven-settings-action@v2.4.0
|
||||
- uses: s4u/maven-settings-action@v2.4.1
|
||||
with:
|
||||
sonatypeSnapshots: true
|
||||
```
|
||||
@ -116,7 +116,7 @@ steps:
|
||||
|
||||
```yml
|
||||
steps:
|
||||
- uses: s4u/maven-settings-action@v2.4.0
|
||||
- uses: s4u/maven-settings-action@v2.4.1
|
||||
with:
|
||||
apacheSnapshots: true
|
||||
```
|
||||
@ -124,7 +124,7 @@ steps:
|
||||
## Do not override existing ```settings.xml```, from version **2.0** file is override by default :
|
||||
```yml
|
||||
steps:
|
||||
- uses: s4u/maven-settings-action@v2.4.0
|
||||
- uses: s4u/maven-settings-action@v2.4.1
|
||||
with:
|
||||
override: false
|
||||
```
|
||||
@ -132,7 +132,7 @@ steps:
|
||||
## Do not add github to server in ```settings.xml```, by default is added:
|
||||
```yml
|
||||
steps:
|
||||
- uses: s4u/maven-settings-action@v2.4.0
|
||||
- uses: s4u/maven-settings-action@v2.4.1
|
||||
with:
|
||||
githubServer: false
|
||||
```
|
||||
@ -141,7 +141,7 @@ steps:
|
||||
|
||||
```yml
|
||||
steps:
|
||||
- uses: s4u/maven-settings-action@v2.4.0
|
||||
- uses: s4u/maven-settings-action@v2.4.1
|
||||
with:
|
||||
oracleServers: '[{"id": "serverId", "username": "username", "password": "password"}]'
|
||||
```
|
||||
@ -149,7 +149,7 @@ steps:
|
||||
## ```settings.xml``` with [Oracle Maven Repository](https://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9017)
|
||||
```yml
|
||||
steps:
|
||||
- uses: s4u/maven-settings-action@v2.4.0
|
||||
- uses: s4u/maven-settings-action@v2.4.1
|
||||
with:
|
||||
oracleRepo: true
|
||||
```
|
||||
@ -160,7 +160,7 @@ It is also possible pass in Github Secrets e.g.
|
||||
|
||||
``` yml
|
||||
steps:
|
||||
- uses: s4u/maven-settings-action@v2.4.0
|
||||
- uses: s4u/maven-settings-action@v2.4.1
|
||||
with:
|
||||
servers: |
|
||||
[{
|
||||
@ -190,11 +190,11 @@ steps:
|
||||
with:
|
||||
java-version: 8
|
||||
|
||||
- uses: s4u/maven-settings-action@v2.4.0
|
||||
- uses: s4u/maven-settings-action@v2.4.1
|
||||
|
||||
- run: mvn verify
|
||||
```
|
||||
|
||||
# License
|
||||
|
||||
The scripts and documentation in this project are released under the [MIT License](LICENSE)
|
||||
The scripts and documentation in this project are released under the [MIT License](LICENSE).
|
||||
|
||||
8056
package-lock.json
generated
8056
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@ -1,11 +1,13 @@
|
||||
{
|
||||
"name": "maven-settings-action",
|
||||
"version": "2.4.0",
|
||||
"version": "2.4.1",
|
||||
"description": "Prepare maven settings",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"lint": "eslint index.js settings.js",
|
||||
"test": "eslint index.js settings.js && jest --coverage"
|
||||
"test": "eslint index.js settings.js && jest --coverage",
|
||||
"version": "./update-readme.sh",
|
||||
"postversion": "git tag --delete v$npm_new_version"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -24,11 +26,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/s4u/maven-settings-action#readme",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.6",
|
||||
"xmldom": "^0.4.0"
|
||||
"@actions/core": "^1.5.0",
|
||||
"@xmldom/xmldom": "^0.7.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^7.20.0",
|
||||
"jest": "^26.6.3"
|
||||
"eslint": "^7.32.0",
|
||||
"jest": "^27.0.6"
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,8 +26,8 @@ const core = require('@actions/core');
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const DOMParser = require('xmldom').DOMParser;
|
||||
const XMLSerializer = require('xmldom').XMLSerializer;
|
||||
const DOMParser = require('@xmldom/xmldom').DOMParser;
|
||||
const XMLSerializer = require('@xmldom/xmldom').XMLSerializer;
|
||||
|
||||
function getSettingsPath() {
|
||||
return path.join(os.homedir(), '.m2', 'settings.xml');
|
||||
|
||||
@ -24,8 +24,8 @@ THE SOFTWARE.
|
||||
|
||||
const os = require('os');
|
||||
const process = require('process');
|
||||
const DOMParser = require('xmldom').DOMParser;
|
||||
const XMLSerializer = require('xmldom').XMLSerializer;
|
||||
const DOMParser = require('@xmldom/xmldom').DOMParser;
|
||||
const XMLSerializer = require('@xmldom/xmldom').XMLSerializer;
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
|
||||
9
update-readme.sh
Executable file
9
update-readme.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "old_version: $npm_old_version"
|
||||
echo "new_version: $npm_new_version"
|
||||
echo "package_name: $npm_package_name"
|
||||
|
||||
sed -i '' "s/$npm_package_name@v$npm_old_version/$npm_package_name@v$npm_new_version/g" README.md
|
||||
|
||||
git add README.md
|
||||
Reference in New Issue
Block a user