Publish (Manual Fallback) #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish (Manual Fallback) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version tag to publish (e.g. v0.3.40)' | |
| required: true | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ inputs.version }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://npm.pkg.github.com' | |
| scope: '@gocodealone' | |
| - run: npm ci | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - run: npm test | |
| - run: npm run build | |
| - run: npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| notify-consumers: | |
| name: Notify IDE Plugins | |
| runs-on: ubuntu-latest | |
| needs: publish | |
| strategy: | |
| matrix: | |
| repo: | |
| - 'GoCodeAlone/workflow-vscode' | |
| - 'GoCodeAlone/workflow-jetbrains' | |
| steps: | |
| - name: Dispatch editor-release to ${{ matrix.repo }} | |
| uses: peter-evans/repository-dispatch@v4 | |
| with: | |
| token: ${{ secrets.REPO_DISPATCH_TOKEN }} | |
| repository: ${{ matrix.repo }} | |
| event-type: editor-release | |
| client-payload: '{"version": "${{ inputs.version }}"}' |