dots_1.5.0 #26
Workflow file for this run
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: tagged-release | |
| on: | |
| push: | |
| tags: | |
| - "v[0-9].[0-9]+.[0-9]+" | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build package | |
| run: npm run build | |
| - name: Verify package contents | |
| run: | | |
| echo "Verifying package structure..." | |
| ls -la src/dots/ | |
| echo "Checking for main entry point..." | |
| test -f src/dots/digitalOceanClient.ts || (echo "Main entry point not found" && exit 1) | |
| echo "Package verification complete" | |
| - name: Create package | |
| run: | | |
| echo "Creating npm package..." | |
| npm pack | |
| ls -la *.tgz | |
| - name: Upload package artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: npm-package | |
| path: "*.tgz" | |
| - name: Publish to npm | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: build-and-publish | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download package artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: npm-package | |
| path: ./ | |
| - name: Set TAG | |
| run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
| - name: Create release | |
| run: | | |
| gh release create ${{ env.TAG }} \ | |
| *.tgz \ | |
| --title "${{ env.TAG }}" \ | |
| --generate-notes \ | |
| --draft | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |