AER-4542: Searchbutton (#19) #19
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 snapshot | |
| # Publishes a dev snapshot to Nexus on every push to main (upstream repo only). | |
| # This runs only for pushes to main, never for pull requests or other branches. | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npm run format:check | |
| - run: npm run type-check | |
| - run: npm test | |
| - run: npm run build-only | |
| # Publish a snapshot to the `dev` tag. Upstream repo only; serialized so | |
| # concurrent pushes don't leave `dev` on an older commit. | |
| publish-snapshot: | |
| needs: build | |
| if: github.repository == 'aerius/vue-geo-components' | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: publish-snapshot | |
| cancel-in-progress: false | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: npm | |
| - run: npm ci | |
| - name: Set a unique snapshot version | |
| run: npm version "0.0.0-dev-${GITHUB_SHA::7}" --no-git-tag-version | |
| - run: npm run build-only | |
| - name: Encode Nexus credentials for npm | |
| run: echo "NEXUS_AUTH=$(printf '%s' "$NEXUS_USERNAME:$NEXUS_PASSWORD" | base64 -w0)" >> "$GITHUB_ENV" | |
| env: | |
| NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | |
| NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | |
| - name: Publish to the dev tag | |
| run: npm publish --tag dev |