|
25 | 25 | os: [ubuntu-latest, windows-latest, macOS-latest]
|
26 | 26 | steps:
|
27 | 27 | - uses: actions/checkout@v2
|
28 |
| - with: |
29 |
| - ref: master |
30 | 28 | - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
31 | 29 | - name: Set an output
|
32 | 30 | id: set-version
|
|
40 | 38 | echo ::set-output name=changelog::$CHANGELOG
|
41 | 39 | git tag -l | cat
|
42 | 40 | [ $GITHUB_EVENT_NAME == 'push' ] && VERSION+=-beta && VERSION+=.$(($(git tag -l "v$VERSION.*" | sort -nt. -k4 2>/dev/null | tail -1 | cut -d. -f4)+1))
|
43 |
| - [ $GITHUB_EVENT_NAME == 'pull_request' ] && VERSION+=-dev |
| 41 | + [ $GITHUB_EVENT_NAME == 'pull_request' ] && VERSION+=-dev.${{ github.event.pull_request.number }} |
44 | 42 | echo ::set-output name=version::$VERSION
|
45 | 43 | NAME=$(jq -r '.name' package.json)-$VERSION
|
46 | 44 | echo ::set-output name=name::$NAME
|
|
65 | 63 | - name: Build package
|
66 | 64 | if: runner.os == 'Linux'
|
67 | 65 | run: |
|
68 |
| - ./node_modules/.bin/vsce package -o ./dist/package.vsix |
| 66 | + ./node_modules/.bin/vsce package -o ./dist/${{ steps.set-version.outputs.name }}.vsix |
69 | 67 | - uses: actions/upload-artifact@v2
|
70 | 68 | if: runner.os == 'Linux'
|
71 | 69 | with:
|
@@ -108,7 +106,7 @@ jobs:
|
108 | 106 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
109 | 107 | with:
|
110 | 108 | upload_url: ${{ steps.create_release.outputs.upload_url }}
|
111 |
| - asset_path: ./dist/package.vsix |
| 109 | + asset_path: ./dist/${{ steps.set-version.outputs.name }}.vsix |
112 | 110 | asset_name: ${{ steps.set-version.outputs.name }}.vsix
|
113 | 111 | asset_content_type: application/zip
|
114 | 112 | publish:
|
@@ -152,7 +150,7 @@ jobs:
|
152 | 150 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
153 | 151 | with:
|
154 | 152 | upload_url: ${{ github.event.release.upload_url }}
|
155 |
| - asset_path: ./dist/package.vsix |
| 153 | + asset_path: ./dist/${{ steps.set-version.outputs.name }}.vsix |
156 | 154 | asset_name: ${{ steps.set-version.outputs.name }}.vsix
|
157 | 155 | asset_content_type: application/zip
|
158 | 156 | - name: Publish to Marketplaces
|
|
0 commit comments