diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..f14e58f12 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: release + +# runs when a tag v* is pushed +# creates a release draft with the binaries + +on: + push: + tags: ["v*"] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm install + - uses: lannonbr/vsce-action@master + with: + args: "package" + - name: Identify output file # can be retrieved as steps.filenames.outputs.file_out + id: filenames + run: echo "::set-output name=file_out::$(ls | grep "^.*\.vsix$" | head -1)" + - uses: actions/upload-artifact@v1 + with: + name: ${{ steps.filenames.outputs.file_out }} + path: ${{ steps.filenames.outputs.file_out }} + + release: + name: Release + needs: build + runs-on: ubuntu-latest + + steps: + - name: Download artifacts + uses: actions/download-artifact@v2 + with: + path: "artifacts/" + - name: Get version from tag + id: get_version + run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\/v/} + - name: Create release + uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + files: "artifacts/*/*" + prerelease: false + draft: true # Could also be false to publish the release immediately +