Skip to content

add styles to icons

add styles to icons #1

Workflow file for this run

name: Bump & Tag
on:
push:
branches:
- "main"
- "release"
jobs:
check-committer:
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.check.outputs.should_run }}
steps:
- id: check
run: |
if [ "${{ github.event.commits[0].author.email }}" != "[email protected]" ]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
fi
bump-version:
name: "Bump Version or Tag"
needs: check-committer
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
newTag: ${{ steps.bump.outputs.newTag }}
if: ${{ needs.check-committer.outputs.should_run == 'true' }}
steps:
- name: "Checkout source code"
uses: "actions/checkout@v2"
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
ref: ${{ github.ref }}
- name: "Automated Version Bump"
id: bump
uses: "phips28/gh-action-bump-version@master"
with:
version-type: ${{ github.ref == 'refs/heads/release' && 'minor' || 'patch' }}
commit-message: "chore: bumps version to {{version}}"
bump-policy: "ignore"
skip-push: "true"
- name: "Create Tags and package version"
run: |
git push --follow-tags
git push --tags
create-release:
name: "Create Release"
needs: bump-version
if: github.ref == 'refs/heads/release'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run NPM build
uses: anna-money/github-actions-npm@master
with:
target: "build"
- uses: johnyherangi/create-release-notes@main
id: create-release-notes
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Get Last PR Title
id: get-pr-title
env:
GH_TOKEN: ${{ github.token }}
run: |
PR_TITLE=$(gh api graphql -f query='
query {
repository(owner: "${{ github.repository_owner }}", name: "${{ github.event.repository.name }}") {
commit: object(expression: "${{ github.sha }}") {
... on Commit {
associatedPullRequests(first: 1) {
edges {
node {
title
}
}
}
}
}
}
}
' --jq '.data.repository.commit.associatedPullRequests.edges[0].node.title')
echo "pr_title=$PR_TITLE" >> $GITHUB_OUTPUT
- uses: ncipollo/release-action@v1
with:
artifacts: "dist/**"
generateReleaseNotes: true
tag: ${{ needs.bump-version.outputs.newTag }}
body: ${{ steps.create-release-notes.outputs.release-notes }}
name: "${{ needs.bump-version.outputs.newTag }} - ${{ steps.get-pr-title.outputs.pr_title }}"
update-main:
name: "Update main branch with release changes"
needs: bump-version
runs-on: ubuntu-latest
permissions:
contents: write
if: github.ref == 'refs/heads/release'
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
fetch-depth: 0
ref: main
- name: Configure Git
run: |
git config user.name 'GitHub Actions Bot'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Merge release into main
run: |
git fetch origin release
git merge origin/release
git push origin main