Skip to content

Move extra steps to the right place (:sob:) #23

Move extra steps to the right place (:sob:)

Move extra steps to the right place (:sob:) #23

Workflow file for this run

name: Build Version
on:
workflow_dispatch:
push:
branches:
- main
permissions:
actions: write
checks: write
contents: write
pull-requests: write
jobs:
bump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: "unbound-mod/builds"
path: "builds"
token: ${{ secrets.GH_TOKEN }}
- uses: pnpm/action-setup@v2
with:
version: latest
- name: Setup Git User
run: |
git config --global user.email "${{ github.event.head_commit.author.email }}"
git config --global user.name "${{ github.event.head_commit.author.name }}"
- name: Bump Patch Version
if: ${{ !contains(github.event.head_commit.message, 'major') && !contains(github.event.head_commit.message, 'major') }}
run: |
pnpm version patch
- name: Bump Minor Version
if: contains(github.event.head_commit.message, 'patch')
run: |
pnpm version minor
- name: Bump Major Version
if: contains(github.event.head_commit.message, 'major')
run: |
pnpm version major
- name: Install dependencies
run: |
npm i -g pnpm
pnpm i
- name: Build bundle
run: |
cd $GITHUB_WORKSPACE
git submodule init
git submodule update --remote --merge
pnpm build
- name: Push to builds repo
run: |
rm -f $GITHUB_WORKSPACE/builds/*
cp -r dist/* $GITHUB_WORKSPACE/builds
cd $GITHUB_WORKSPACE/builds
git add .
git commit -m "$GITHUB_SHA" || exit 0
git push