Skip to content

Grain Release

Grain Release #21

Workflow file for this run

name: Grain Release
on:
workflow_dispatch:
inputs:
tag:
description: "The tag of release"
required: true
jobs:
release-updates:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Replace download links
# This checks the "grain" prefix so our preview links aren't updated
run: |
sed -E -i 's|(https://github\.com/grain-lang/grain/releases/download/)grain[^/]+(/)|\1${{ github.event.inputs.tag }}\2|g' src/getting_grain.md
- name: Checkout Grain
uses: actions/checkout@v2
with:
repository: grain-lang/grain
ref: ${{ github.event.inputs.tag }}
path: grain
- name: Configure git
run: |
git config user.name grainbot[bot]
git config user.email bot@grain-lang.org
- name: Install latest grain
uses: engineerd/configurator@v0.0.8
with:
name: "grain"
url: "https://github.com/grain-lang/grain/releases/download/${{ github.event.inputs.tag }}/grain-linux-x64"
- name: Generate stdlib docs
run: |
grain doc grain/stdlib -o src/stdlib --current-version=$(grain -v)
- name: Commit updates
run: |
git add src/getting_grain.md
git add src/stdlib/
git commit -m 'chore: Update website for ${{ github.event.inputs.tag }}'
- name: Push updates
run: |
git push