-
Notifications
You must be signed in to change notification settings - Fork 3
126 lines (111 loc) · 3.62 KB
/
release.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: BoxLang Quick Installers
on:
# If you push to main this will trigger a stable release
push:
branches:
- main
env:
# The installer version
VERSION: 1.1.0
jobs:
publish:
name: Publish Release
runs-on: ubuntu-latest
# add write permissions
permissions:
contents: write
checks: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Update changelog [unreleased] with latest version
uses: thomaseizinger/[email protected]
with:
changelogPath: ./changelog.md
tag: v${{ env.VERSION }}
- name: Fix Markdown on Changelog
run: |
npm install -g markdownlint-cli
markdownlint changelog.md --fix
- name: Commit Changelog [unreleased] with latest version
uses: EndBug/[email protected]
with:
author_name: Github Actions
author_email: [email protected]
message: "Finalized changelog for v${{ env.VERSION }}"
add: changelog.md
- name: Tag Version
uses: rickstaa/[email protected]
with:
tag: "v${{ env.VERSION }}"
force_push_tag: true
message: "Latest Release v${{ env.VERSION }}"
- name: Upload Build Artifacts
if: success()
uses: actions/upload-artifact@v4
with:
path: |
src/**
changelog.md
- name: Upload Distributions to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: "downloads.ortussolutions.com"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }}
SOURCE_DIR: "src/"
DEST_DIR: "ortussolutions/boxlang"
- name: Create Github Release
uses: taiki-e/[email protected]
continue-on-error: true
id: create_release
with:
title: ${{ env.VERSION }}
changelog: changelog.md
token: ${{ secrets.GITHUB_TOKEN }}
ref: refs/tags/v${{ env.VERSION }}
- name: Inform Slack
if: ${{ always() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: coding
SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
SLACK_ICON_EMOJI: ":bell:"
SLACK_MESSAGE: "BoxLang ${{ env.VERSION }} Built with ${{ job.status }}!"
SLACK_TITLE: "BoxLang Build"
SLACK_USERNAME: CI
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
##########################################################################################
# Prep Next Release
##########################################################################################
prep_next_release:
name: Prep Next Release
if: github.ref != 'refs/heads/development'
runs-on: ubuntu-latest
needs: [publish]
# add write permissions
permissions:
contents: write
checks: write
steps:
- name: Checkout Development Repository
uses: actions/checkout@v4
with:
ref: development
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: .tmp
- name: Copy Changelog
run: |
cp -vf .tmp/artifact/changelog.md changelog.md
- name: Commit
uses: EndBug/[email protected]
with:
author_name: Github Actions
author_email: [email protected]
message: "Version bump"
add: |
changelog.md