Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasmohrin committed Jun 12, 2021
1 parent ac6733f commit 6b1e968
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release

env:
smalltalk: 'Squeak64-5.3'
PATH_TO_SAR: '/home/runner/.smalltalkCI/_builds/Algernon.sar'

on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
name: Build SAR
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # full-clone, needed for commit messages
- uses: hpi-swa/setup-smalltalkCI@v1
id: smalltalkci
with:
smalltalk-image: ${{ ENV.smalltalk }}
- run: smalltalkci -s ${{ ENV.smalltalk }} ./.release.smalltalk.ston
shell: bash
timeout-minutes: 15
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Retrieve Release Version
if: startsWith(github.ref, 'refs/tags/')
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Generate Release Notes
run: |
LAST_VERSION=$(git tag --list --sort=-version:refname "v*" | head -2 | tail -1)
echo "Comparing $LAST_VERSION to $RELEASE_VERSION"
git log $LAST_VERSION..$RELEASE_VERSION --pretty=format:'- %s' | tee ${{ github.workspace }}-CHANGELOG.txt
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ ENV.PATH_TO_SAR }}
name: Algernon ${{ ENV.RELEASE_VERSION }}
body_path: ${{ github.workspace }}-CHANGELOG.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

22 changes: 22 additions & 0 deletions .release.smalltalk.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'Algernon',
#directory : 'packages',
#load : 'Tests',
#platforms : [ #squeak ],
#useLatestMetacello : true
}
],
#preLoading : [
'scripts/preLoading.st'
],
#postLoading : [
'scripts/create_sar.st'
],
#testing : {
#categories : [],
#failOnZeroTests : false
}
}

1 change: 1 addition & 0 deletions scripts/create_sar.st
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALGInstallation instance sarFromPackage: 'Algernon'.
1 change: 1 addition & 0 deletions temp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
still a temp file

0 comments on commit 6b1e968

Please sign in to comment.