Release #148
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: Release | |
permissions: | |
contents: write | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 3 * * 1' | |
jobs: | |
test-lint-build: | |
timeout-minutes: 3 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkouting repo | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Node setup | |
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Install deps | |
run: yarn install && yarn nuxt prepare | |
- name: Run tests | |
run: yarn run test | |
- name: Run lint | |
run: yarn run lint --ignore-pattern ".github" | |
- name: Run Build | |
run: yarn run build | |
bump-package-version: | |
needs: test-lint-build | |
timeout-minutes: 4 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkouting repo | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Node setup | |
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 | |
with: | |
node-version: 18 | |
cache: yarn | |
- name: Bump versions | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git pull | |
npx --yes changelogen@latest --release | |
- name: Push changes | |
env: | |
PAT: ${{ secrets.ACTIONS_PAT }} | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git remote set-url origin "https://[email protected]/logotip4ik/keycap" | |
git push origin ${{ github.ref_name }} | |
trigger-release: | |
needs: [test-lint-build, bump-package-version] | |
timeout-minutes: 1 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Trigger deployment | |
env: | |
AUTH: ${{ secrets.DEPLOYMENT_AUTH }} | |
TRIGGER_DEPLOYMENT: ${{ secrets.TRIGGER_DEPLOYMENT }} | |
shell: bash | |
run: curl -s -H "$AUTH" $TRIGGER_DEPLOYMENT > /dev/null |