diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 405721d..1c6db9d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,17 +4,9 @@ on: push: workflow_dispatch: -env: - DOCKER_REGISTRY_HOST: ${{ secrets.HEROKU_REGISTRY_HOST }} - DOCKER_IMAGE: ${{ github.repository }} - DOCKER_REGISTRY_USERNAME: ${{ github.repository_owner }} - HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} - PHRASE_CLI_VERSION: "2.5.0" - PHRASE_ACCESS_TOKEN: ${{ secrets.PHRASE_ACCESS_TOKEN }} - jobs: deploy: - name: Deploy the application to Heroku + name: Publish the extension to VS Code Marketplace runs-on: ubuntu-latest steps: - name: Checkout @@ -22,4 +14,15 @@ jobs: with: ref: ${{ github.event.workflow_run.head_branch || github.ref }} - - + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 18 + + - name: Install dependencies + run: npm ci + + - name: Publish + run: make compile_and_package && make publish + env: + VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} diff --git a/README.md b/README.md index 8ce331f..c81a310 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,15 @@ Run the test from the `Status bar` or `Menu` ### III/ Publish -1. Run `make compile_and_package` -2. Run `make publish` +- Generate the VSCE_TOKEN on https://dev.azure.com/andyduong1920/_usersSettings/tokens. + +1. On Github Action +- Update the secret on Github Action. +- Trigger the `publish` workflow. + +2. On Local +- Run `make compile_and_package` +- Run `make publish` ### IV/ Add new Item 1. Define the bar item in `src/editableArea/1_definitions.ts`