forked from MLton/mlton
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a361d99
commit 9f9dd0f
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
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,36 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
mlton-version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
MLTON_VERSION: ${{ steps.mlton-version.outputs.MLTON_VERSION }} | ||
steps: | ||
- name: MLTON_VERSION | ||
id: mlton-version | ||
run: | | ||
MLTON_VERSION=$( echo '${{ github.ref_name }}' | sed -En 's;on-([0-9]{8})-release;\1;p') | ||
if [ -n "${MLTON_VERSION}" ]; then echo "MLTON_VERSION=${MLTON_VERSION}" >> "$GITHUB_OUTPUT"; else echo "Unable to determine MLTON_VERSION"; exit 1; fi | ||
source-release: | ||
runs-on: ubuntu-latest | ||
needs: mlton-version | ||
env: | ||
MLTON_VERSION: ${{ needs.mlton-version.outputs.MLTON_VERSION }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install guide dependencies | ||
uses: ./.github/actions/install-guide-dependencies | ||
- name: Make source release | ||
run: make MLTON_VERSION=${MLTON_VERSION} source-release | ||
- name: Upload source release | ||
run: gh release upload on-${MLTON_VERSION}-release mlton-${MLTON_VERSION}.src.tgz | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |