2021-08-23 05:55:59 +00:00
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "v*.*.*"
|
|
|
|
|
2022-05-27 00:32:28 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-08-23 05:55:59 +00:00
|
|
|
jobs:
|
|
|
|
|
|
|
|
release:
|
2022-05-27 00:32:28 +00:00
|
|
|
permissions:
|
|
|
|
contents: write # for softprops/action-gh-release to create GitHub release
|
2021-08-23 05:55:59 +00:00
|
|
|
name: Build release binaries
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ ubuntu-latest, macos-latest ]
|
|
|
|
steps:
|
|
|
|
- name: Checkout the repository
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Set the version
|
|
|
|
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
|
|
|
- name: Set the platform
|
2021-08-23 06:24:25 +00:00
|
|
|
run: echo "platform=$(tr '[A-Z]' '[a-z]' <<< $RUNNER_OS)" >> $GITHUB_ENV
|
2021-08-23 05:55:59 +00:00
|
|
|
- name: Compile the project
|
|
|
|
run: make clean && make
|
|
|
|
- name: Build the artifact
|
2021-08-23 06:47:25 +00:00
|
|
|
run: JANET_DIST_DIR=janet-${{ env.version }}-${{ env.platform }} make build/janet-${{ env.version }}-${{ env.platform }}-x64.tar.gz
|
2021-08-23 05:55:59 +00:00
|
|
|
- name: Draft the release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
draft: true
|
|
|
|
files: |
|
|
|
|
build/*.gz
|
|
|
|
build/janet.h
|
|
|
|
build/c/janet.c
|
|
|
|
build/c/shell.c
|
2021-12-04 19:23:34 +00:00
|
|
|
|
|
|
|
release-windows:
|
2022-05-27 00:32:28 +00:00
|
|
|
permissions:
|
|
|
|
contents: write # for softprops/action-gh-release to create GitHub release
|
2021-12-04 19:23:34 +00:00
|
|
|
name: Build release binaries for windows
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout the repository
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Setup MSVC
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
- name: Build the project
|
|
|
|
shell: cmd
|
|
|
|
run: build_win all
|
|
|
|
- name: Draft the release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
draft: true
|
|
|
|
files: |
|
2021-12-05 22:31:18 +00:00
|
|
|
./dist/*.zip
|
2021-12-04 19:23:34 +00:00
|
|
|
./*.zip
|
|
|
|
./*.msi
|
2024-04-17 03:02:31 +00:00
|
|
|
|
|
|
|
release-cosmo:
|
|
|
|
permissions:
|
|
|
|
contents: write # for softprops/action-gh-release to create GitHub release
|
|
|
|
name: Build release binaries for Cosmo
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-04-17 03:15:54 +00:00
|
|
|
- name: create build folder
|
|
|
|
run: |
|
|
|
|
sudo mkdir -p /ahgamut
|
|
|
|
sudo chmod -R 0777 /ahgamut
|
2024-04-17 03:02:31 +00:00
|
|
|
- name: Checkout superconfigure repo
|
2024-04-17 03:15:54 +00:00
|
|
|
working-directory: /ahgamut
|
2024-04-17 03:02:31 +00:00
|
|
|
run: git clone https://github.com/ahgamut/superconfigure
|
|
|
|
- name: support ape bins and SSL things
|
2024-04-17 03:15:54 +00:00
|
|
|
working-directory: /ahgamut/superconfigure
|
|
|
|
run: bash ./.github/scripts/setup
|
2024-04-17 03:02:31 +00:00
|
|
|
- name: build Cosmo
|
|
|
|
working-directory: /ahgamut/superconfigure
|
|
|
|
run: bash ./.github/scripts/cosmo
|
|
|
|
- name: clone Janet latest commit
|
|
|
|
working-directory: /ahgamut/superconfigure
|
|
|
|
run: |
|
|
|
|
make o/lang/janet/downloaded
|
|
|
|
cd o/lang/janet/janet
|
|
|
|
git pull origin master
|
|
|
|
- name: Set the version
|
|
|
|
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
|
|
|
- name: Set the platform
|
|
|
|
run: echo "platform=cosmo" >> $GITHUB_ENV
|
|
|
|
- name: build Janet APE binary
|
|
|
|
working-directory: /ahgamut/superconfigure
|
|
|
|
run: make o/lang/janet/built.fat
|
|
|
|
- name: push binary to github
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
draft: true
|
|
|
|
files: |
|
|
|
|
results/bin/janet.com
|