forked from ExpressionEngine/ExpressionEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (77 loc) · 2.58 KB
/
Copy pathrelease.yml
File metadata and controls
79 lines (77 loc) · 2.58 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
name: Release
on:
push:
tags:
- '6.[0-9]+.[0-9]+'
jobs:
build:
#if: github.base_ref == '6.x'
name: Build & Release
runs-on: ubuntu-latest
steps:
- uses: olegtarasov/get-tag@v2.1
id: tagName
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout Pro
uses: actions/checkout@v4
with:
repository: EllisLab/ExpressionEngine-Pro
token: ${{ secrets.ORG_ACCESS_TOKEN }}
path: __pro
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '10'
- name: Install build tool dependencies
working-directory: build-tools
run: npm install
- name: Rebuild CSS and JS
run: |
npm install
npm run build:css --production
npm run build:js
npm run build:old-js
- name: Run build process
working-directory: build-tools
env:
RELEASE_PRIVATE_KEY: ${{ secrets.RELEASE_PRIVATE_KEY }}
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
APP_REPO_PATH: ${{ github.workspace }}
PRO_REPO_PATH: ${{ github.workspace }}/__pro
run: gulp app --local --head --skip-lint --version=${{ steps.tagName.outputs.tag }}
- name: Archive Build files
uses: actions/upload-artifact@v4
with:
name: EE${{ steps.tagName.outputs.tag }}
path: build-tools/builds
- name: Get previous release tag
id: prev_release_tag
continue-on-error: true
uses: oprypin/find-latest-tag@v1
with:
repository: ExpressionEngine/ExpressionEngine
regex: '^6\.\d+\.\d+$'
releases-only: true
- name: Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v3
env:
GITHUB_TOKEN: ${{ secrets.ORG_ACCESS_TOKEN }}
with:
fromTag: ${{ steps.prev_release_tag.outputs.tag }}
toTag: ${{ github.event.push.head.sha }}
configuration: build-tools/changelog.config.json
- uses: ncipollo/release-action@v1.12.0
with:
artifacts: "build-tools/builds/ExpressionEngine*,build-tools/builds/signature*"
name: ExpressionEngine ${{ steps.tagName.outputs.tag }}
allowUpdates: true
token: ${{ secrets.ORG_ACCESS_TOKEN }}
body: ${{ steps.build_changelog.outputs.changelog }}
- name: Directory Listing on Failure
if: failure()
run: |
ls -latr
ls -latr build-tools
ls -latr build-tools/builds