This repository has been archived by the owner on Oct 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
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 #378 from prabushi/master
Add git action to draft a release without tests
- Loading branch information
Showing
1 changed file
with
74 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,74 @@ | ||
# Test build against released Ballerina distribution, skipping test run | ||
name: Draft A Release (Without tests) | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
plugin_version: | ||
description: VSIX Release Version | ||
required: true | ||
default: 2.0.0-Preview5-SNAPSHOT | ||
tag: | ||
description: Release Tag | ||
required: true | ||
default: vswan-lake-preview5-snapshot | ||
vsix_version: | ||
description: Name of VSIX Asset | ||
required: true | ||
default: swan-lake-preview5-snapshot | ||
bal_dist_version: | ||
description: Version of Ballerina distribution | ||
required: true | ||
default: swan-lake-preview5 | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
name: Upload VSIX as release assets | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Build project | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- name: Install java 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: "11" | ||
- name: Download ballerina distribution | ||
uses: wei/wget@v1 | ||
with: | ||
args: http://dist-dev.ballerina.io/downloads/${{ github.event.inputs.bal_dist_version }}/ballerina-${{ github.event.inputs.bal_dist_version }}.zip | ||
- run: mkdir extractedDistribution | ||
- name: Unzip ballerina distribution | ||
uses: TonyBogdanov/zip@1.0 | ||
with: | ||
args: unzip -qq ./ballerina-${{ github.event.inputs.bal_dist_version }}.zip -d ./extractedDistribution | ||
- run: rm ballerina-${{ github.event.inputs.bal_dist_version }}.zip | ||
- run: npm ci | ||
- name: Build repository with tests | ||
uses: GabrielBB/xvfb-action@v1.0 | ||
with: | ||
run: ./gradlew clean build -x test | ||
- name: Create release draft | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
with: | ||
tag_name: ${{ github.event.inputs.tag }} | ||
release_name: Release ${{ github.event.inputs.vsix_version }} | ||
draft: true | ||
prerelease: true | ||
- name: Upload release asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./ballerina-${{ github.event.inputs.plugin_version }}.vsix | ||
asset_name: ballerina-${{ github.event.inputs.vsix_version }}.vsix | ||
asset_content_type: application/octet-stream |