Skip to content

fix: adds name and email for tag #12

fix: adds name and email for tag

fix: adds name and email for tag #12

Workflow file for this run

name: Deployment
on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- ".github/workflows/**"
- "jest.config.js"
- "package.json"
- "src/**"
- "tests/**"
- "tsconfig.json"
- "yarn.lock"
permissions:
issues: write
contents: write
pull-requests: write
repository-projects: write
jobs:
continuous-deployment:
name: Deployment
runs-on: ubuntu-latest
steps:
- name: 👇 Checkout
uses: actions/checkout@v3
- name: 🤹 Instal Deps
run: yarn install
- name: 🧪 Test
run: yarn test
- name: 🧱 Build
run: |
yarn build
if [ "$(git status --porcelain)" != "" ]; then
echo "GIT_IS_DIRTY=true" >> $GITHUB_ENV
else
echo "GIT_IS_DIRTY=false" >> $GITHUB_ENV
fi
- name: 🙋‍♀️ Get Version
if: env.GIT_IS_DIRTY == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
LATEST_TAG=$(gh api repos/endaft/action-yamler/releases/latest --jq=.tag_name)
echo "LATEST_TAG=${LATEST_TAG}" >> $GITHUB_ENV
- name: ✊ Bump Version
if: env.GIT_IS_DIRTY == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
IFS=. read -r v1 v2 v3 <<< "${LATEST_TAG}" # split into (integer) components
echo "LATEST_TAG=${LATEST_TAG}"
echo "LATEST_VERSION=${v1}.${v2}.${v3}"
v3=$((v3 + 1)) # do the math
echo "NEXT_VERSION=${v1}.${v2}.${v3}"
echo "LATEST_TAG=${v1}.${v2}.${v3}" >> $GITHUB_ENV
- name: 🏷️ Tag
if: env.GIT_IS_DIRTY == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
git config user.email "you@example.com"
git config user.name "Your Name"
git tag -f "$LATEST_TAG" -m "Version $LATEST_TAG"
git tag -f latest -m "The latest version"
- name: 📌 Commit & Push
if: env.GIT_IS_DIRTY == 'true'
uses: GuillaumeFalourd/git-commit-push@v1.3
with:
name: github-actions[bot]
email: github-actions[bot]@users.noreply.github.com
commit_message: "chore: updates dist js"
tags: true
force: true