-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (47 loc) · 1.57 KB
/
ci-cd-tag-prod.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
name: Generate github tag version ☕
on:
push:
branches: [master]
jobs:
build:
if: "contains(github.event.head_commit.message, '--release')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Installing Composer dependencies ⬇️
run: composer install --prefer-dist --no-progress
- name: Installing Node dependencies ⬇️
run: yarn install --frozen-lockfile --prefer-offline
- name: Building node dependencies 🧱
run: yarn build
- name: Removing development folders 🗑️
run: |
rm -r -f build/
rm -r -f node_modules/
rm -r -f .vscode/
rm -r -f .parcel-cache/
rm -r -f .idea/
rm -r -f tests/
rm -r -f assets/scripts/
rm -r -f assets/styles/
- name: Removing development files 🗑️
run: |
rm -f composer.json
rm -f composer.lock
rm -f package.json
rm -f package-json.lock
rm -f yarn.lock
rm -f README.md
rm -f .gitignore
rm -f tailwind.config.js
- name: Creating a new GitHub tag 🤖
run: |
TAG_VERSION=$(bash .github/tag.sh)
rm -r -f .github/
git config --global user.email "[email protected]"
git config --global user.name "Matheus Aguiar"
git add .
git commit -am "build: Building a new version"
git tag -a v$TAG_VERSION -m "New tag: v$TAG_VERSION"
git push origin v$TAG_VERSION
echo "All right! 🍕"