-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from ballerina-platform/update-master
Add missing isolated tag in stub template file
- Loading branch information
Showing
4 changed files
with
77 additions
and
42 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 |
---|---|---|
@@ -1,28 +1,54 @@ | ||
name: Publish release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
on: [workflow_dispatch, repository_dispatch] | ||
|
||
jobs: | ||
publish-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Publish artifact | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_STDLIB_TOKEN }} | ||
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_ACCESS_TOKEN }} | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.BALLERINA_STDLIB_TOKEN }} | ||
run: | | ||
NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3) | ||
echo "New version: ${NEW_VERSION}" | ||
echo "Github username: ${GITHUB_ACTOR}" | ||
./gradlew -PpublishToCentral=true -Pversion=${NEW_VERSION} publish | ||
publish-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Set version env variable | ||
run: echo ::set-env name=VERSION::$((grep -w "version" | cut -d= -f2) < gradle.properties | cut -d- -f1) | ||
- name: Pre release depenency version update | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
run: | | ||
echo "Version: ${VERSION}" | ||
git config user.name ${{ secrets.BALLERINA_BOT_USERNAME }} | ||
git config user.email ${{ secrets.BALLERINA_BOT_EMAIL }} | ||
git checkout -b release-${VERSION} | ||
sed -i 's/ballerinaLangVersion=\(.*\)-SNAPSHOT/ballerinaLangVersion=\1/g' gradle.properties | ||
sed -i 's/stdlib\(.*\)=\(.*\)-SNAPSHOT/stdlib\1=\2/g' gradle.properties | ||
git add gradle.properties | ||
git commit -m "Move dependencies to stable version" || echo "No changes to commit" | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Publish artifact | ||
env: | ||
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_ACCESS_TOKEN }} | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.BALLERINA_STDLIB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
run: | | ||
./gradlew release -Prelease.useAutomaticVersion=true | ||
./gradlew -Pversion=${VERSION} publish -x test | ||
- name: Create Github release from the release tag | ||
run: | | ||
curl --request POST 'https://api.github.com/repos/ballerina-platform/module-ballerina-grpc/releases' \ | ||
--header 'Accept: application/vnd.github.v3+json' \ | ||
--header 'Authorization: Bearer ${{ secrets.BALLERINA_BOT_TOKEN }}' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"tag_name": "v'"$VERSION"'", | ||
"name": "module-ballerina-grpc-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 -m "[Automated] Sync master 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
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
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