Atualizado workflow para GitHub Actions usar Trusted Publishing via O… #9
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: Build and Release | |
| permissions: | |
| contents: write | |
| id-token: write | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Clean dist | |
| run: rm -rf dist | |
| - name: Build | |
| run: npm run build | |
| - name: Zip dist folder | |
| run: | | |
| cd dist | |
| zip -r ../gupy-linkedin-sync.zip . | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: gupy-linkedin-sync.zip | |
| draft: false | |
| - name: Publish to npm | |
| run: npm publish --access public |