BuildZip #48
Workflow file for this run
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
name: BuildZip | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
FILENAME: git | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Cache Gradle | |
uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Gradle Build | |
run: | | |
chmod +x ./gradlew | |
./gradlew :ci-git-checkout:git-checkout-credential:clean shadowJar | |
./gradlew clean buildZip | |
- name: Create checkout | |
uses: actions/upload-artifact@v1 | |
with: | |
name: checkout.zip | |
path: ./build/distributions/checkout.zip | |
# This workflow contains a single job called "build" | |
build_en: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Cache Gradle | |
uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Gradle Build | |
run: | | |
chmod +x ./gradlew | |
./gradlew :ci-git-checkout:git-checkout-credential:clean shadowJar | |
./gradlew clean buildEnZip | |
- name: Create checkout_en | |
uses: actions/upload-artifact@v1 | |
with: | |
name: checkout_en.zip | |
path: ./build/distributions/checkout_en.zip | |
# This workflow contains a single job called "build" | |
release: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
needs: [build, build_en] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: true | |
prerelease: true | |
- name: download checkout | |
uses: actions/download-artifact@v3 | |
with: | |
name: checkout.zip | |
path: ./ | |
- name: download checkout_en | |
uses: actions/download-artifact@v3 | |
with: | |
name: checkout_en.zip | |
path: ./ | |
- name: ls | |
run: | | |
ls -la | |
- name: Upload checkout.zip | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./checkout.zip | |
asset_name: checkout.zip | |
asset_content_type: application/zip | |
- name: Upload checkout_en.zip | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./checkout_en.zip | |
asset_name: checkout_en.zip | |
asset_content_type: application/zip |