-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3fc630
commit b6a2b3d
Showing
7 changed files
with
248 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Purpose | ||
|
||
Fixes: | ||
|
||
## Examples | ||
|
||
## Checklist | ||
- [ ] Linked to an issue | ||
- [ ] Updated the specification | ||
- [ ] Updated the changelog | ||
- [ ] Added tests | ||
- [ ] Checked native-image compatibility |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ubuntu-build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get Ballerina Version | ||
run: | | ||
BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev) | ||
if [ -z "$BAL_VERSION" ]; then | ||
BAL_VERSION="latest" | ||
fi | ||
echo "BAL_VERSION=$BAL_VERSION" >> $GITHUB_ENV | ||
echo "Ballerina Version: $BAL_VERSION" | ||
- name: Set Up Ballerina | ||
uses: ballerina-platform/[email protected] | ||
with: | ||
version: ${{ env.BAL_VERSION }} | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17.0.7 | ||
|
||
- name: Build the Package | ||
env: | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
./gradlew build -x test | ||
./gradlew test | ||
- name: Generate Codecov Report | ||
uses: codecov/codecov-action@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Daily build | ||
|
||
on: | ||
schedule: | ||
- cron: "30 2 * * *" | ||
|
||
jobs: | ||
ubuntu-build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set Up Ballerina | ||
uses: ballerina-platform/[email protected] | ||
with: | ||
version: latest | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: 17.0.7 | ||
|
||
- name: Build the Package | ||
env: | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
./gradlew build -x test -PbuildUsingDocker=nightly | ||
- name: Test the Package | ||
env: | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
./gradlew test -PbuildUsingDocker=nightly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: PR Build | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
ubuntu-build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get Ballerina Version | ||
run: | | ||
BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev) | ||
if [ -z "$BAL_VERSION" ]; then | ||
BAL_VERSION="latest" | ||
fi | ||
echo "BAL_VERSION=$BAL_VERSION" >> $GITHUB_ENV | ||
echo "Ballerina Version: $BAL_VERSION" | ||
- name: Set Up Ballerina | ||
uses: ballerina-platform/[email protected] | ||
with: | ||
version: ${{ env.BAL_VERSION }} | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17.0.7 | ||
|
||
- name: Build the Package | ||
env: | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
./gradlew build -x test | ||
./gradlew test | ||
- name: Generate Codecov Report | ||
uses: codecov/codecov-action@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Publish Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish-release: | ||
name: Release Package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get Ballerina Version | ||
run: | | ||
BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev) | ||
if [ -z "$BAL_VERSION" ]; then | ||
BAL_VERSION="latest" | ||
fi | ||
echo "BAL_VERSION=$BAL_VERSION" >> $GITHUB_ENV | ||
echo "Ballerina Version: $BAL_VERSION" | ||
- name: Set Up Ballerina | ||
uses: ballerina-platform/[email protected] | ||
with: | ||
version: ${{ env.BAL_VERSION }} | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17.0.7 | ||
|
||
- name: Build without Tests | ||
env: | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global user.name ${{ secrets.USERNAME }} | ||
git config --global user.email ${{ secrets.EMAIL }} | ||
./gradlew build -x test | ||
- name: Create lib Directory if not Exists | ||
run: mkdir -p ballerina/lib | ||
|
||
- name: Run Trivy Vulnerability Scanner | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
scan-type: "rootfs" | ||
scan-ref: "/github/workspace/ballerina/lib" | ||
format: "table" | ||
timeout: "10m0s" | ||
exit-code: "1" | ||
skip-dirs: "examples" | ||
|
||
- name: Get Release Version | ||
run: echo "VERSION=$((grep -w 'version' | cut -d= -f2) < gradle.properties | rev | cut -d- -f2 | rev)" >> $GITHUB_ENV | ||
|
||
- name: Checkout to Release Branch | ||
run: | | ||
echo "Version: ${VERSION}" | ||
git checkout -b release-${VERSION} | ||
- name: Remove Target Directory | ||
run: | | ||
sudo rm -rf ballerina/target | ||
sudo rm -rf ballerina/build | ||
- name: Publish Package | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} | ||
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_ACCESS_TOKEN }} | ||
packageUser: ${{ secrets.USERNAME }} | ||
packagePAT: ${{ secrets.TOKEN }} | ||
publishUser: ${{ secrets.USERNAME }} | ||
publishPAT: ${{ secrets.TOKEN }} | ||
run: | | ||
./gradlew clean release -Prelease.useAutomaticVersion=true | ||
./gradlew -Pversion=${VERSION} publish -x test -PpublishToCentral=true | ||
- name: GitHub Release and Release Sync PR | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} | ||
run: | | ||
gh release create v$VERSION --title "module-niveathika-pluralize-v$VERSION" | ||
gh pr create --base ${GITHUB_REF##*/} --title "[Automated] Sync ${GITHUB_REF##*/} after $VERSION release" --body "Sync ${GITHUB_REF##*/} after $VERSION release" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Changelog | ||
|
||
This file contains all the notable changes done to the Ballerina `pluralize` package through the releases. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
### Added | ||
|
||
### Changed | ||
|
||
## [1.0.0] - 03/06/2024 | ||
|
||
### Added | ||
- Add `pluralize` library. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
coverage: | ||
precision: 2 | ||
round: down | ||
range: "60...80" | ||
status: | ||
project: | ||
default: | ||
target: 80 |