Skip to content

Merge pull request #225 from etchteam/dependabot/npm_and_yarn/npm_and… #194

Merge pull request #225 from etchteam/dependabot/npm_and_yarn/npm_and…

Merge pull request #225 from etchteam/dependabot/npm_and_yarn/npm_and… #194

Workflow file for this run

---
name: 🚀 Release
on:
push:
branches:
- main
env:
HUSKY: 0
permissions:
contents: read
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
if: "!contains(toJSON(github.event.commits.*.message), '[skip ci]')"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
run: npm ci
- name: Get package version
id: package-version
run: |
npm run release -- --ci false --dryRun | tee /dev/tty | grep -i "Published release" > .semver-output
echo "current-version=$([[ $(cat .semver-output) =~ .*([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+) ]] && echo "${BASH_REMATCH[1]}")" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Build
run: npm run build
env:
SENTRY_ORG: 'wrap'
SENTRY_PROJECT: 'recycling-locator'
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
VITE_SENTRY_DSN: 'https://[email protected]/4506864957194240'
VITE_HERE_MAPS_PLACES_KEY: ${{ vars.VITE_HERE_MAPS_PLACES_KEY }}
VITE_RECYCLING_LOCATOR_API: https://rl.recyclenow.com/widget/
VITE_PUBLIC_PATH: https://cdn.jsdelivr.net/npm/@etchteam/recycling-locator@${{ steps.package-version.outputs.current-version }}/dist/
VITE_PACKAGE_VERSION: ${{ steps.package-version.outputs.current-version }}
VITE_ENABLE_ANALYTICS: 'true'
- name: Publish
run: npm run release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}