diff --git a/.github/workflows/build-dev-branches.yml b/.github/workflows/build-dev-branches.yml index ecb8fd8..03d74f3 100644 --- a/.github/workflows/build-dev-branches.yml +++ b/.github/workflows/build-dev-branches.yml @@ -10,7 +10,6 @@ on: jobs: ubuntu-build: - name: Build Development Branches on Ubuntu runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -28,7 +27,6 @@ jobs: ./gradlew clean build --stacktrace --scan --console=plain --no-daemon windows-build: - name: Build Development Branches on Windows runs-on: windows-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml index 5672811..f4b0313 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build-main.yml @@ -8,7 +8,6 @@ on: jobs: build: - name: Build Main Branch runs-on: ubuntu-latest if: github.repository_owner == 'ballerina-platform' steps: diff --git a/.github/workflows/daily-build.yml b/.github/workflows/daily-build.yml index 7d9a5f6..52f92d3 100644 --- a/.github/workflows/daily-build.yml +++ b/.github/workflows/daily-build.yml @@ -6,7 +6,6 @@ on: jobs: ubuntu-build: - name: Daily Builds to verify on Ubuntu runs-on: ubuntu-latest if: github.repository_owner == 'ballerina-platform' steps: @@ -24,7 +23,6 @@ jobs: run: ./gradlew clean build --stacktrace --scan --console=plain --no-daemon windows-build: - name: Daily Builds to verify on Windows runs-on: windows-latest if: github.repository_owner == 'ballerina-platform' steps: diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 25680e7..7ef36cc 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -4,7 +4,6 @@ on: [workflow_dispatch] jobs: publish-release: - name: Publish Release runs-on: ubuntu-latest if: github.repository_owner == 'ballerina-platform' steps: @@ -14,7 +13,7 @@ jobs: with: java-version: 11 - name: Set version env variable - run: echo "VERSION=$((grep -w 'version' | cut -d= -f2) < gradle.properties | cut -d- -f1)" >> ${GITHUB_ENV} + run: echo "VERSION=$((grep -w 'version' | cut -d= -f2) < gradle.properties | cut -d- -f1)" >> $GITHUB_ENV - name: Pre release depenency version update env: GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} @@ -47,12 +46,12 @@ jobs: --header 'Authorization: Bearer ${{ secrets.BALLERINA_BOT_TOKEN }}' \ --header 'Content-Type: application/json' \ --data-raw '{ - "tag_name": "v'"${VERSION}"'", - "name": "module-ballerinax-prometheus-v'"${VERSION}"'" + "tag_name": "v'"$VERSION"'", + "name": "module-ballerinax-prometheus-v'"$VERSION"'" }' - name: Post release PR env: GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} run: | curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1 - bin/hub pull-request --base main -m "[Automated] Sync master after "${VERSION}" release" + bin/hub pull-request --base main -m "[Automated] Sync master after "$VERSION" release" diff --git a/.github/workflows/publish-timestamped-release.yaml b/.github/workflows/publish-timestamped-release.yaml deleted file mode 100644 index e27de34..0000000 --- a/.github/workflows/publish-timestamped-release.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: Publish Timestamped Release - -on: [workflow_dispatch] - -jobs: - publish-to-dev-ballerina-central: - name: Publish Timestamped Release - runs-on: ubuntu-latest - if: github.repository_owner == 'ballerina-platform' - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: Change to Timestamped Version - run: | - startTime=$(TZ="Asia/Kolkata" date +'%Y%m%d-%H%M00') - latestCommit=$(git log -n 1 --pretty=format:"%h") - VERSION=$((grep -w 'version' | cut -d= -f2) < gradle.properties | rev | cut --complement -d- -f1 | rev) - updatedVersion=${VERSION}-${startTime}-${latestCommit} - echo "Updated Version: ${updatedVersion}" - sed -i "s/version=\(.*\)/version=${updatedVersion}/g" gradle.properties - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Publish artifact - env: - GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} - BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_DEV_CENTRAL_ACCESS_TOKEN }} - BALLERINA_DEV_CENTRAL: true - packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }} - packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }} - packagePublishRepo: ${{ github.repository }} - run: | - ./gradlew clean build publish --scan diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 9b1ee8c..4bc5cfd 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -4,7 +4,6 @@ on: pull_request jobs: ubuntu-build: - name: Validate PR on Ubuntu runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -25,7 +24,6 @@ jobs: uses: codecov/codecov-action@v1 windows-build: - name: Validate PR on Windows runs-on: windows-latest steps: - uses: actions/checkout@v2 diff --git a/prometheus-extension-ballerina/build.gradle b/prometheus-extension-ballerina/build.gradle index e7a274e..8b50ad9 100644 --- a/prometheus-extension-ballerina/build.gradle +++ b/prometheus-extension-ballerina/build.gradle @@ -90,7 +90,7 @@ def artifactBallerinaDocs = file("${project.projectDir}/build/docs_parent/") def artifactCacheParent = file("${project.buildDir}/cache_parent/") def artifactLibParent = file("${project.buildDir}/lib_parent/") def snapshotVersion = "-SNAPSHOT" -def tomlVersion = "${project.version}" +def tomlVersion = stripBallerinaExtensionVersion("${project.version}") def ballerinaCentralAccessToken = System.getenv('BALLERINA_CENTRAL_ACCESS_TOKEN') def originalConfig = ballerinaConfigFile.text def originalDependencyConfig = ballerinaDependencyFile.text