-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (65 loc) · 2.86 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: CI
on:
push:
branches:
- main
- alpha
- beta
workflow_dispatch:
jobs:
main:
name: semantic-release
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
if: "!contains(github.event.head_commit.message, 'skip release')"
steps:
# - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
# - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
# - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
# - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
# - run: echo "🖥️ The workflow is now ready to test your code on the runner."
# - name: List files in the repository
# run: |
# ls ${{ github.workspace }}
- name: Install dependencies
shell: bash
run: |
sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git-core ca-certificates curl make gettext php8.0 php8.0-intl subversion librsvg2-bin imagemagick
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
- name: run semantic-release
env:
# enable next line when using the action in a public github repo
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# enable next line when using the action in a private github repo
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
shell: bash
run: |
export NVM_DIR="$HOME/.nvm"
export SVN_USERNAME
export SVN_PASSWORD
export NPM_PASSWORD
. "$NVM_DIR/nvm.sh" && nvm install && npm -q ci && npx semantic-release
# - run: echo "🍏 This job's status is ${{ job.status }}."
- name: deploy documentation (gp-pages)
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/gh-pages/book
- name: Merge main back into develop
if: ${{ github.ref == 'refs/heads/main' }}
uses: everlytic/[email protected]
with:
# enable next line when using the action in a private github repo
# github_token: ${{ secrets.GH_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
source_ref: "main"
target_branch: "develop"
commit_message_template: "Merge branch {source_ref} into {target_branch} [skip release] [skip ci]"