Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
Merge pull request #378 from prabushi/master
Browse files Browse the repository at this point in the history
Add git action to draft a  release without tests
  • Loading branch information
NipunaRanasinghe committed Apr 24, 2021
2 parents 3865556 + 672b16e commit 7fa14d1
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/draft-release-without-test.yml
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

0 comments on commit 7fa14d1

Please sign in to comment.