AdguardTeam / VscodeAdblockSyntax

Comprehensive extension to manage Adblock Syntax in VSCode: syntax highlighter, linter and much more. Available on the VSCode Marketplace.
https://marketplace.visualstudio.com/items?itemName=adguard.adblock
MIT License
70 stars 8 forks source link

Release guide #73

Closed scripthunter7 closed 1 year ago

scripthunter7 commented 1 year ago

As soon as we are ready with the release workflow, we should prepare a release guide that describes the steps. These are basically the following:

ameshkov commented 1 year ago

@scripthunter7

I'll add it before publishing the new update.

Do you think we should put it in the CONTRIBUTING.md?

scripthunter7 commented 1 year ago

@ameshkov

I thought about putting this chapter in CONTRIBUTING.md, but I think it would be a better idea to put it in docs/releasing.md.

I think the release process should be automated first (I created the workflow for this), and then something similar to ECSSTree's releasing guide should be written here.

ameshkov commented 1 year ago

Well, these are different tasks I think.

While it's not automated, I can document the manual process and then just replace unnecessary parts when it's time.

Although, If you already have an automated workflow, please post it here, I'll debug it a little and add as a part of this task.

scripthunter7 commented 1 year ago

@ameshkov

Here is the workflow code. I haven't tried the VSCE release (last step), but everything else seems to work, I tested it in a private repo. Please review it and feel free to add it to the release process

Show YML code ```yml name: Release to VSCode Marketplace and GitHub Releases on: push: tags: - v* # Workflow need write access to the repository to create a release permissions: contents: write jobs: release: runs-on: ubuntu-latest steps: - name: Check out the repository uses: actions/checkout@v3 - name: Set up Node.js uses: actions/setup-node@v3 with: node-version: 16 registry-url: https://registry.npmjs.org cache: yarn - name: Install dependencies run: | # Install VSCE globally yarn global add @vscode/vsce # Install dependencies in the root directory yarn install --ignore-scripts --frozen-lockfile # Install dependencies in the client directory cd client yarn install --ignore-scripts --frozen-lockfile # Install dependencies in the server directory cd ../server yarn install --ignore-scripts --frozen-lockfile # ESBuild ignores type checking, so we need to run it separately # before running ESBuild - name: Check TypeScript types run: yarn test-compile - name: Run ESLint run: yarn lint # Run ESBuild & generate VSIX file - name: Pack files with VSCE run: yarn generate-vsix - name: Create GitHub Release uses: softprops/action-gh-release@v1 with: files: | vscode-adblock.vsix draft: false prerelease: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # TODO: Publish to VSCode Marketplace # - name: Publish to VSCode Marketplace # run: vsce publish -p ${{ secrets.VSCE_TOKEN }} ```