release-insiders.yml 1009 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: Release Insiders
  2. on:
  3. push:
  4. branches: [main]
  5. permissions:
  6. contents: read
  7. id-token: write
  8. jobs:
  9. build:
  10. runs-on: ubuntu-latest
  11. strategy:
  12. matrix:
  13. node-version: [22]
  14. steps:
  15. - uses: actions/checkout@v4
  16. - name: Use Node.js ${{ matrix.node-version }}
  17. uses: actions/setup-node@v4
  18. with:
  19. node-version: ${{ matrix.node-version }}
  20. registry-url: 'https://registry.npmjs.org'
  21. cache: 'npm'
  22. - name: Install dependencies
  23. run: npm install
  24. - name: Resolve version
  25. id: vars
  26. run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
  27. - name: 'Version based on commit: 0.0.0-insiders.${{ steps.vars.outputs.sha_short }}'
  28. run: npm version 0.0.0-insiders.${{ steps.vars.outputs.sha_short }} --force --no-git-tag-version
  29. - name: Publish
  30. run: npm publish --provenance --tag insiders
  31. env:
  32. NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}