1
0
forked from GitHub/gf-rgl

Change build workflow to take care of creating entire release

This commit is contained in:
John J. Camilleri
2020-11-14 17:19:00 +01:00
parent aa3b6648f3
commit 519a31e88a
3 changed files with 71 additions and 30 deletions

View File

@@ -1,30 +0,0 @@
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-18.04
env:
GF_VERSION: 3.10-1
DEST: out/
steps:
- uses: actions/checkout@v2
- name: Install GF
run: |
curl -s https://www.grammaticalframework.org/download/gf_${GF_VERSION}_amd64.deb -o gf.deb
sudo dpkg -i gf.deb
- name: Build RGL
run: |
mkdir -p ${DEST}
bash Setup.sh --dest=${DEST} --gf=gf --verbose
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: gf-rgl-${{ github.sha }}
path: ${{ env.DEST }}
if-no-files-found: error

61
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,61 @@
name: Create RGL release
on:
workflow_dispatch:
inputs:
tag:
description: Release tag (should be YYYYMMDD format)
jobs:
build:
runs-on: ubuntu-18.04
env:
GF_VERSION: 3.10-1
DEST: gf-rgl-${{ github.event.inputs.tag }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install GF
run: |
curl -s https://www.grammaticalframework.org/download/gf_${GF_VERSION}_amd64.deb -o gf.deb
sudo dpkg -i gf.deb
- name: Build RGL
run: |
mkdir -p ${DEST}
bash Setup.sh --dest=${DEST} --gf=gf --verbose
- name: Create archive
run: |
zip asset.zip -r ${{ env.DEST }}
# - name: Upload artifact
# uses: actions/upload-artifact@v2
# with:
# name: gf-rgl-${{ github.sha }}
# path: ${{ env.DEST }}
# if-no-files-found: error
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.tag }}
release_name: Release ${{ github.event.inputs.tag }}
draft: false
prerelease: false
- name: Upload release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: asset.zip
asset_name: gf-rgl-${{ github.event.inputs.tag }}.zip
asset_content_type: application/zip

10
RELEASE.md Normal file
View File

@@ -0,0 +1,10 @@
# RGL releases
The RGL does not use semantic versioning.
Releases are instead made periodically, as snapshots of the current state of the library.
Releases are Git tagged `YYYYMMDD`, and for each release a binary package (as `.gfo` files) is made available as a GitHub release.
## Creating a new release
1. Run the "Create release" workflow through the GitHub actions interface
(instructions [here](https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/manually-running-a-workflow)).