-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rename deploy actions * rename and fix release action * remove period after version in footer
- Loading branch information
Showing
5 changed files
with
57 additions
and
28 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/workflows/deploy_preview.yaml → .github/workflows/ci-preview.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Deploy preview | ||
name: CI - Preview | ||
on: [pull_request] | ||
jobs: | ||
deploy: | ||
|
2 changes: 1 addition & 1 deletion
2
.github/workflows/deploy_prod.yaml → .github/workflows/ci-production.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Deploy to production | ||
name: CI - Production | ||
on: | ||
push: | ||
branches: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: CI - Release | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
# if the action is a push, diff with the previous main commit | ||
- name: Build changelog | ||
id: build_changelog | ||
run: | | ||
echo "====== build changelog ======" | ||
# create changelog file | ||
echo "# What's Changed" > CHANGELOG.md | ||
# check total app tags and the last commit tag | ||
n_tags=`git tag -l 'v*' --sort=-v:refname | wc -l` | ||
prev_tag=`git tag -l 'v*' --sort=-v:refname | sed '2q;d'` | ||
if [ $n_tags -eq 1 ]; then | ||
last_commit=`git rev-list --max-parents=0 HEAD` | ||
else | ||
last_commit=`git rev-list -n 1 $prev_tag` | ||
fi | ||
# fill changelog with commit descriptions | ||
# set max tries equal to the maximum of commits as protection | ||
max_tries=`git rev-list --count HEAD` | ||
i=0 | ||
while [ `git rev-parse HEAD~$i` != $last_commit ] && [ $i -lt $((max_tries-1)) ] | ||
do | ||
echo '- ' `git show -s --format=%s HEAD~$i` >> CHANGELOG.md | ||
i=$((i+1)) | ||
done | ||
# set full changelog url | ||
echo >> CHANGELOG.md | ||
compare="" | ||
if [ $n_tags -eq 1 ]; then | ||
compare=$last_commit | ||
else | ||
compare=$prev_tag | ||
fi | ||
compare="${compare}...`git tag -l 'v*' --sort=-v:refname | sed '1q;d'`" | ||
echo "**Full Changelog**: https://github.com/boxfish-studio/fontana/compare/${compare}" >> CHANGELOG.md | ||
- name: Create Release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Fontana ${{ github.ref }} | ||
draft: true | ||
body_path: CHANGELOG.md |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters