-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dmitry Maslennikov
authored and
Dmitry Maslennikov
committed
Dec 20, 2019
1 parent
1453f9b
commit cae07da
Showing
1 changed file
with
28 additions
and
5 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 |
---|---|---|
|
@@ -19,19 +19,42 @@ jobs: | |
- name: Use Node.js | ||
uses: actions/setup-node@master | ||
with: | ||
version: 10 | ||
node-version: 10 | ||
- run: npm install | ||
- run: npm run compile | ||
- run: npm run test | ||
env: | ||
DISPLAY: :10 | ||
- name: Set an output | ||
id: get-version | ||
if: runner.os == 'Linux' | ||
run: | | ||
echo ::set-output name=version::$(jq -r '.version' package.json | cut -d- -f1)-B$(date -u "+%Y%m%d") | ||
echo ::set-output name=name::$(jq -r '.name+"-"+.version' package.json | cut -d- -f1-3)-B$(date -u "+%Y%m%d") | ||
- name: Build package | ||
if: runner.os == 'Linux' | ||
run: | | ||
mkdir dist | ||
./node_modules/.bin/vsce package -o ./dist/$(jq -r '.name + "-" + .version' package.json).vsix | ||
- uses: actions/upload-artifact@master | ||
./node_modules/.bin/vsce package -o ./dist/${{ steps.get-version.outputs.name }}.vsix | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
if: runner.os == 'Linux' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ steps.get-version.outputs.version }} | ||
release_name: v${{ steps.get-version.outputs.version }} | ||
draft: false | ||
prerelease: true | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/[email protected] | ||
if: runner.os == 'Linux' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
name: vscode-objectscript | ||
path: dist | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./dist/${{ steps.get-version.outputs.name }}.vsix | ||
asset_name: ${{ steps.get-version.outputs.name }}.vsix | ||
asset_content_type: application/zip |