1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-16 13:44:48 +00:00
janet/.github/workflows/release.yml

63 lines
1.7 KiB
YAML
Raw Normal View History

2021-08-23 05:55:59 +00:00
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: read
2021-08-23 05:55:59 +00:00
jobs:
release:
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
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:
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: |
./dist/*.zip
2021-12-04 19:23:34 +00:00
./*.zip
./*.msi