UNPKG

octokit-fetch-all-repos

Version:

Fetch all repos for a GitHub org/user/team, including/excluding archived, forked etc

40 lines (36 loc) 1.12 kB
name: NPM Publish on: release: types: [published] permissions: contents: write jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.release.target_commitish }} - name: Use Node.js uses: actions/setup-node@v4 with: node-version: 20 registry-url: https://registry.npmjs.org/ - run: npm ci - run: git config --global user.name "Michael Heap" - run: git config --global user.email "m@michaelheap.com" - run: npm version ${{ github.event.release.tag_name }} - run: npm run build --if-present - run: npm test --if-present - run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: git push env: github-token: ${{ secrets.GITHUB_TOKEN }} - run: git tag -f ${{ github.event.release.tag_name }} ${{ github.event.release.target_commitish }} env: github-token: ${{ secrets.GITHUB_TOKEN }} - run: git push origin ${{ github.event.release.tag_name }} --force env: github-token: ${{ secrets.GITHUB_TOKEN }}