Merge pull request #37 from moosetechnology/file-encoding #51
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
name: CI | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the development branch | |
on: | |
push: | |
branches: | |
- v2 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
PROJECT_NAME: ${{ matrix.smalltalk }}-FAST | |
strategy: | |
matrix: | |
smalltalk: [ Moose64-10 ] | |
name: ${{ matrix.smalltalk }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: hpi-swa/setup-smalltalkCI@v1 | |
with: | |
smalltalk-image: ${{ matrix.smalltalk }} | |
- run: smalltalkci -s ${{ matrix.smalltalk }} | |
shell: bash | |
timeout-minutes: 15 | |
- name: Build meta-model plantuml image | |
run: | | |
$SMALLTALK_CI_VM $SMALLTALK_CI_IMAGE eval "'fast-core.puml' asFileReference writeStreamDo: [ :stream | stream nextPutAll: (FamixMMUMLDocumentor new model: FASTModel; beWithStub; generatePlantUMLModelWithout: { FASTModel })]." | |
- name: Generate Coaster PNG Diagrams | |
uses: cloudbees/plantuml-github-action@master | |
with: | |
args: -v -tpng fast-core.puml | |
- name: Move UML | |
run: | | |
mkdir doc-uml | |
mv *.png doc-uml | |
- name: Init new repo UML in doc-uml folder and commit generated files | |
run: | | |
cd doc-uml/ | |
echo "# Documentation | |
This is a generated branch" > Readme.md | |
git init | |
git add -A | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git commit -m 'update doc' | |
# Careful, this can kill your project | |
- name: Force push to destination branch | |
uses: ad-m/[email protected] | |
with: | |
# Token for the repo. Can be passed in using $\{{ secrets.GITHUB_TOKEN }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
force: true | |
# Destination branch to push changes | |
branch: v2-doc | |
# We have to push from the folder where files were generated. | |
# Same were the new repo was initialized in the previous step | |
directory: ./doc-uml | |
- name: package | |
run: | | |
mv /home/runner/.smalltalkCI/_builds/* . | |
mv TravisCI.image $PROJECT_NAME.image | |
mv TravisCI.changes $PROJECT_NAME.changes | |
zip -r $PROJECT_NAME.zip $PROJECT_NAME.image $PROJECT_NAME.changes *.sources pharo.version | |
ls | |
- name: Update Release | |
# You may pin to the exact commit or the version. | |
# uses: johnwbyrd/update-release@1d5ec4791e40507e5eca3b4dbf90f0b27e7e4979 | |
uses: johnwbyrd/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: ${{ env.PROJECT_NAME }}.zip |