From e513ed51649044001f739a0515ab018ebb5151de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Schmitz?= Date: Mon, 18 Jan 2021 11:09:57 -0300 Subject: [PATCH] ci: create workflows for deploy --- .github/workflows/create-release.yml | 36 ++++++++++++++++++++++++++++ .github/workflows/deploy.yml | 17 +++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/workflows/create-release.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000..449209d --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,36 @@ +name: Create Release + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v1 + + - run: npm install && mkdir -p ./bin + + - run: npm run package + + - uses: actions/create-release@v1 + id: create_release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: true + + - uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./bin/omni.vsix + asset_name: omni.vsix + asset_content_type: application/octet-stream \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..8b8fd53 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,17 @@ +name: Deploy Release + +on: + release: + types: + - published + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + - run: npm install + - env: + VSCE_PUBLISHER_TOKEN: ${{ secrets.VSCE_PUBLISHER_TOKEN }} + run: npm run vsce-publish -- -p $VSCE_PUBLISHER_TOKEN \ No newline at end of file