From 684bcc4c64cb073f00355aa00e1e1921f5469b5c Mon Sep 17 00:00:00 2001 From: Thach Nguyen Date: Wed, 3 Aug 2022 23:23:28 +0700 Subject: [PATCH] Bump version to release v5.1 --- .github/workflows/build.yml | 29 ++++++++++++++++++++++++ README.md | 45 ++++++++++++++++++++++++++++--------- package.json | 2 +- 3 files changed, 65 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c842399 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +# This workflow will install node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Build Action + +on: [push, pull_request] + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + version: [12, 14, 16] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.version }} + cache: yarn + - name: Install dependencies + run: yarn --no-bin-links + - run: yarn build + - run: yarn lint + - run: yarn test --coverage diff --git a/README.md b/README.md index 373d32a..e505486 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,39 @@ -### How To Use +# setup-maven -Add this step into workflow +[![Build Action](https://github.com/thachnn/setup-maven/actions/workflows/build.yml/badge.svg)](https://github.com/thachnn/setup-maven/actions/workflows/build.yml) +[![Integration Tests](https://github.com/thachnn/setup-maven/actions/workflows/tests.yml/badge.svg)](https://github.com/thachnn/setup-maven/actions/workflows/tests.yml) + +This action provides the following functionality for GitHub Actions runners: + +- Optionally downloading and caching a requested version of Maven, and adding it to the PATH +- The requested version supports an exact version or a version range using [SemVer](https://semver.org/) notation + +## Usage + +See [action.yml](action.yml) + +**Basic:** ```yaml -jobs: - ... - steps: - - - name: Set up Maven - uses: stCarolas/setup-maven@v5 - with: - maven-version: 3.8 +steps: + - name: Set up Maven + uses: thachnn/setup-maven@v5 + with: + maven-version: 3.8 ``` +The `maven-version` input is optional. If not supplied, the maven version from PATH will be used. + +### Supported version syntax + +The `maven-version` input supports the [Semantic Versioning Specification](https://github.com/npm/node-semver), examples: + +- Major versions: `2`, `3` +- More specific versions: `3.2`, `3.3.9`, `3.5.x`, `~3.8.2`, `>=3.3.3` +- Latest release: `*` + +## Contributing + ### Development using [Docker](https://docs.docker.com/) Clone this repository and build the project with command @@ -43,3 +64,7 @@ docker run --rm -it --link docker-sonarqube -v "%PWD%:/usr/src/app" -w /usr/src/ -e "SONAR_HOST_URL=http://docker-sonarqube:9000" -e "SONAR_LOGIN=" sonarsource/sonar-scanner-cli ^ -Dsonar.projectKey=setup-maven -Dsonar.sources=. "-Dsonar.exclusions=dist/**,lib/**" ``` + +## License + +The scripts and documentation in this project are released under the `MIT License` diff --git a/package.json b/package.json index 89f841a..20c67c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-maven", - "version": "5.0.0", + "version": "5.1.0", "private": true, "description": "setup maven action", "main": "dist/index.js",