fix: input group #302
This file contains 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: Vercel Production Deployment | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
versioning: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
- name: Install dependencies | |
run: npm install | |
- name: Setup Git user | |
run: | | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: Show Git Status | |
run: git status | |
- name: Release with release-it | |
run: | | |
commit_message=$(git log -1 --pretty=%B) | |
if [[ "$commit_message" == *"alpha"* ]]; then | |
npx release-it minor --preRelease=alpha --ci | |
else | |
npx release-it --ci | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
deploy: | |
needs: versioning | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Fetch latest changes | |
run: | | |
git fetch --prune | |
git checkout master | |
git pull | |
- name: Install Vercel CLI | |
run: npm install --global vercel@latest | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project Artifacts | |
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy Project Artifacts to Vercel | |
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | |
release-npm: | |
needs: versioning | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Fetch latest changes | |
run: | | |
git fetch --prune | |
git checkout master | |
git pull | |
- uses: actions/setup-node@v3 | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install Deps | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Release | |
run: | | |
commit_message=$(git log -1 --pretty=%B) | |
echo "Commit message: $commit_message" | |
if [[ "$commit_message" == *"alpha"* ]]; then | |
cd dist/bundle && npm publish --tag alpha --access public --non-interactive | |
else | |
cd dist/bundle && npm publish --access public --non-interactive | |
fi | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |