-
Notifications
You must be signed in to change notification settings - Fork 17
36 lines (34 loc) · 1.33 KB
/
marketplace.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: publish to marketplace custom branch
on: [workflow_dispatch]
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: install dependencies
run: npm install
- name: publish into marketplace
run: npm run vscode:publish
env:
TOKEN: ${{ secrets.TOKEN }}
- name: extract version number
run: |
export BUILD_BRANCH_PARTS=(${GITHUB_REF//// })
export BUILD_VERSION=$(awk -F \" '$2 == "version" {print $4}' package.json)
export TAG_VERSION=$([[ "${BUILD_BRANCH_PARTS[-1]}" == "master" ]] && echo "v$BUILD_VERSION" || echo "${BUILD_BRANCH_PARTS[-1]}-v$BUILD_VERSION")
echo "build version: ${BUILD_VERSION}"
echo "tag version: ${TAG_VERSION}"
echo "TAG_VERSION=${TAG_VERSION}" >> ${GITHUB_ENV}
- name: package the extension
run: npm run vscode:package
- name: release package to github repo
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
automatic_release_tag: ${{ env.TAG_VERSION }}
prerelease: false
title: 'Json to Dart Extension ${{ env.TAG_VERSION }}'
files: |
./json-to-dart-${{ env.BUILD_VERSION }}.vsix