1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-26 01:27:07 +00:00
bazarr/.github/workflows/release_major_and_merge.yaml

59 lines
1.6 KiB
YAML
Raw Normal View History

name: release_major_and_merge
2021-03-25 14:22:43 +00:00
on: workflow_dispatch
jobs:
Release:
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
steps:
- name: Validate branch
if: ${{ github.ref != 'refs/heads/development' }}
run: |
echo This action can only be run on development branch, not ${{ github.ref }}
exit 1
2021-03-25 14:22:43 +00:00
- name: Checkout source code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: development
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
2021-03-25 14:22:43 +00:00
node-version: "15.x"
- run: npm install -D release-it
- run: npm install -D @release-it/bumper
- run: npm install -D auto-changelog
2021-03-25 14:22:43 +00:00
- id: latest_release
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: ${{ github.repository }}
excludes: prerelease, draft
- name: Define LAST_VERSION environment variable
run: |
2021-03-25 14:22:43 +00:00
echo "LAST_VERSION=${{steps.latest_release.outputs.release}}" >> $GITHUB_ENV
- name: Update version and create release
uses: TheRealWaldo/release-it@v0.2.1
with:
json-opts: '{"increment": "major"}'
Merge:
needs: Release
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Merge development -> master
uses: devmasx/merge-branch@v1.3.1
with:
type: now
from_branch: development
target_branch: master
2021-03-25 14:22:43 +00:00
github_token: ${{ secrets.GITHUB_TOKEN }}