forked from FarmData2/FarmData2-School
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.35 KB
/
release.yml
File metadata and controls
53 lines (43 loc) · 1.35 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
name: FD2Release
on:
push:
branches: [production, development]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
FD2Release:
name: Build FarmData2 Drupal Module for Release
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Get Node.js
uses: actions/setup-node@v3
with:
cache: 'npm'
- name: Install CI Dependencies
run: npm ci
- name: Build the farmdata2 Drupal Module
run: npm run build:fd2
- name: Create zip and tar.gz of farmdata2 Drupal Module
run: |
npm run zip:fd2
npm run tgz:fd2
- name: Create Semantic Versioned Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# When push is to production a new release was created
# so delete all but the most recent pre-release
# on development branch.
- name: Delete Pre-releases
if: github.ref == 'refs/heads/production'
uses: jay2610/delete-older-releases@1.4.0
with:
keep_latest: 1
delete_tags: 'true'
delete_type: 'prerelease'
target_branch: 'development'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}