Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MOBILE-3542] Fix doc builds and uploads; use GITHUB_OUTPUT #2

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 24 additions & 29 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,30 @@ jobs:

- name: Get Version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Verify Version
run: |
VERSION=${{ steps.get_version.outputs.VERSION }}
PLUGIN_VERSION=$(./gradlew -q getVersion)
if [[ $PLUGIN_VERSION = $VERSION ]]; then exit 0 ; else exit 1; fi

- name: Get Release Notes
- name: Get the release notes
id: get_release_notes
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
run: |
VERSION=${{ steps.get_version.outputs.VERSION }}
NOTES="$(awk "/## Version $VERSION/{flag=1;next}/## Version/{flag=0}flag" CHANGELOG.md)"
NOTES="${NOTES//'%'/'%25'}"
NOTES="${NOTES//$'\n'/'%0A'}"
NOTES="${NOTES//$'\r'/'%0D'}"
echo ::set-output name=NOTES::"$NOTES"

- uses: actions/setup-python@v4
with:
python-version: '3.9'
delimiter="$(openssl rand -hex 8)"
{
echo "NOTES<<${delimiter}"
awk "/## Version $VERSION/{flag=1;next}/## Version/{flag=0}flag" CHANGELOG.md
echo ${delimiter}
} >> $GITHUB_OUTPUT

# - name: Setup GCP
# uses: google-github-actions/setup-gcloud@daadedc81d5f9d3c06d2c92f49202a3cc2b919ba # v0.2.1
# with:
# version: '351.0.0'
# service_account_email: ${{ secrets.GCP_SA_EMAIL }}
# service_account_key: ${{ secrets.GCP_SA_KEY }}
- name: Setup GCP Auth
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}

- name: Set up JDK 11
uses: actions/setup-java@v3
Expand All @@ -64,24 +60,23 @@ jobs:
run: |
dotnet workload install android ios maui-android maui-ios maui-maccatalyst

# - name: Install doc dependencies
# run: |
# brew install doxygen
# brew install graphviz
- name: Install doc dependencies
run: |
brew install doxygen
brew install graphviz

- name: Build
#run: ./gradlew build pack packageDocs
run: ./gradlew build pack
run: ./gradlew build pack packageDocs

- name: Publish Nugets
env:
NUGET_PRODUCTION_API_KEY: ${{ secrets.NUGET_PRODUCTION_API_KEY }}
run: ./gradlew publishToProduction

# - name: Upload Docs
# run: |
# VERSION=${{ steps.get_version.outputs.VERSION }}
# gsutil cp docs/build/$VERSION.tar.gz gs://ua-web-ci-prod-docs-transfer/libraries/maui/$VERSION.tar.gz
- name: Upload Docs
run: |
VERSION=${{ steps.get_version.outputs.VERSION }}
gsutil cp docs/build/$VERSION.tar.gz gs://ua-web-ci-prod-docs-transfer/libraries/maui/$VERSION.tar.gz

- name: Create Github Release
uses: actions/[email protected]
Expand Down