mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
ci: Merges different platform releases into one (#1313)
* ci: Merges different platform releases into one * ci: Removes platform specific release pipelines
This commit is contained in:
parent
0efb9825f0
commit
cf3fddfe3a
41
.github/disabled-workflows/release_macos.yml
vendored
41
.github/disabled-workflows/release_macos.yml
vendored
@ -1,41 +0,0 @@
|
|||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
||||||
|
|
||||||
name: Create Release (macOS)
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Create Release
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Build and zip
|
|
||||||
run: ./scripts/release.sh ${{ github.ref }} --noprompt
|
|
||||||
|
|
||||||
- name: Create Github Release
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.ref }}
|
|
||||||
release_name: Release ${{ github.ref }}
|
|
||||||
body: |
|
|
||||||
This is a release of the Carp compiler on macOS.
|
|
||||||
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: ./releases/${{ github.ref }}.zip
|
|
||||||
asset_name: ${{ github.ref }}.zip
|
|
||||||
asset_content_type: application/zip
|
|
136
.github/workflows/release.yml
vendored
Normal file
136
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||||
|
|
||||||
|
name: Create Release
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build Release
|
||||||
|
runs-on: ${{ matrix.runner }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: Linux
|
||||||
|
runner: ubuntu-latest
|
||||||
|
artefact-name: "x86_64-linux"
|
||||||
|
|
||||||
|
- os: MacOS
|
||||||
|
runner: macos-latest
|
||||||
|
artefact-name: "x86_64-macos"
|
||||||
|
|
||||||
|
- os: Windows
|
||||||
|
runner: windows-latest
|
||||||
|
artefact-name: "x86_64-windows"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Get tag name
|
||||||
|
id: get_tag_name
|
||||||
|
shell: bash
|
||||||
|
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/*/}
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- if: matrix.os == 'MacOS'
|
||||||
|
uses: actions/setup-haskell@v1
|
||||||
|
|
||||||
|
- if: matrix.os == 'Windows'
|
||||||
|
name: Install Scoop
|
||||||
|
run: |
|
||||||
|
iwr -useb get.scoop.sh | iex
|
||||||
|
echo "~\scoop\shims" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
|
echo "C:\ProgramData\scoop\shims" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
|
|
||||||
|
- if: matrix.os == 'Windows'
|
||||||
|
name: Install Stack
|
||||||
|
run: scoop install stack
|
||||||
|
|
||||||
|
- if: matrix.os == 'Windows'
|
||||||
|
name: Install Zip
|
||||||
|
run: scoop install zip --global
|
||||||
|
|
||||||
|
- if: matrix.os == 'Windows'
|
||||||
|
name: Install Clang
|
||||||
|
run: scoop install llvm --global
|
||||||
|
|
||||||
|
- if: matrix.os == 'Windows'
|
||||||
|
uses: actions/cache@v1
|
||||||
|
name: Cache stack dependencies
|
||||||
|
with:
|
||||||
|
path: C:\\Users\\runneradmin\\AppData\\Local\\Programs\\stack
|
||||||
|
key: ${{ runner.os }}-stack-deps-${{ github.sha }}
|
||||||
|
restore-keys: ${{ runner.os }}-stack-deps
|
||||||
|
|
||||||
|
- if: matrix.os == 'Windows'
|
||||||
|
uses: actions/cache@v1
|
||||||
|
name: Cache stack build
|
||||||
|
with:
|
||||||
|
path: C:\\Users\\runneradmin\\AppData\\Roaming\\stack\
|
||||||
|
key: ${{ runner.os }}-stack-build-${{ github.sha }}
|
||||||
|
restore-keys: ${{ runner.os }}-stack-build
|
||||||
|
|
||||||
|
- name: Build and zip
|
||||||
|
shell: bash
|
||||||
|
run: "./scripts/release.sh carp-${{ steps.get_tag_name.outputs.VERSION }}-${{ matrix.artefact-name }} --noprompt"
|
||||||
|
|
||||||
|
- name: Upload Artefact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: carp-${{ steps.get_tag_name.outputs.VERSION }}-${{ matrix.artefact-name }}.zip
|
||||||
|
path: ./releases/carp-${{ steps.get_tag_name.outputs.VERSION }}-${{ matrix.artefact-name }}.zip
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: Upload Release
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Get tag name
|
||||||
|
id: get_tag_name
|
||||||
|
shell: bash
|
||||||
|
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/*/}
|
||||||
|
|
||||||
|
- name: Creates releases folder
|
||||||
|
run: mkdir ./releases
|
||||||
|
|
||||||
|
- name: Retrieve Windows artefact
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: carp-${{ steps.get_tag_name.outputs.VERSION }}-x86_64-windows.zip
|
||||||
|
path: ./releases
|
||||||
|
|
||||||
|
- name: Retrieve MacOS artefact
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: carp-${{ steps.get_tag_name.outputs.VERSION }}-x86_64-macos.zip
|
||||||
|
path: ./releases
|
||||||
|
|
||||||
|
- name: Retrieve Linux artefact
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: carp-${{ steps.get_tag_name.outputs.VERSION }}-x86_64-linux.zip
|
||||||
|
path: ./releases
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
artifacts: "./releases/*.zip"
|
||||||
|
body: |
|
||||||
|
This is a release of the Carp compiler.
|
||||||
|
|
||||||
|
See [CHANGELOG.md](CHANGELOG.md) for a list of changes.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
- Download and unzip the corresponding zip file for your platform
|
||||||
|
- Export an environment variable called `CARP_DIR` containing the path to the unzipped folder
|
||||||
|
- Add `$CARP_DIR/bin` to your path
|
||||||
|
|
||||||
|
You should now be able to run the REPL by calling `carp`
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
tag: ${{ steps.get_tag_name.outputs.VERSION }}
|
||||||
|
allowUpdates: true
|
||||||
|
removeArtifacts: true
|
||||||
|
replacesArtifacts: true
|
||||||
|
artifactContentType: "application/zip"
|
45
.github/workflows/release_linux.yml
vendored
45
.github/workflows/release_linux.yml
vendored
@ -1,45 +0,0 @@
|
|||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
||||||
|
|
||||||
name: Create Release (Linux)
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Create Release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Get tag name
|
|
||||||
id: get_tag_name
|
|
||||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
|
||||||
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Build and zip
|
|
||||||
run: "./scripts/release.sh ${{ steps.get_tag_name.outputs.VERSION }} --noprompt"
|
|
||||||
|
|
||||||
- name: Create Github Release
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ steps.get_tag_name.outputs.VERSION }}_Linux
|
|
||||||
release_name: Release ${{ steps.get_tag_name.outputs.VERSION }}_Linux
|
|
||||||
body: |
|
|
||||||
This is a release of the Carp compiler on Linux.
|
|
||||||
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: ./releases/${{ steps.get_tag_name.outputs.VERSION }}.zip
|
|
||||||
asset_name: ${{ steps.get_tag_name.outputs.VERSION }}.zip
|
|
||||||
asset_content_type: application/zip
|
|
47
.github/workflows/release_macos.yml
vendored
47
.github/workflows/release_macos.yml
vendored
@ -1,47 +0,0 @@
|
|||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
||||||
|
|
||||||
name: Create Release (macOS)
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Create Release
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- name: Get tag name
|
|
||||||
id: get_tag_name
|
|
||||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
|
||||||
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- uses: actions/setup-haskell@v1
|
|
||||||
|
|
||||||
- name: Build and zip
|
|
||||||
run: ./scripts/release.sh ${{ steps.get_tag_name.outputs.VERSION }} --noprompt
|
|
||||||
|
|
||||||
- name: Create Github Release
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ steps.get_tag_name.outputs.VERSION }}_macOS
|
|
||||||
release_name: Release ${{ steps.get_tag_name.outputs.VERSION }}_macOS
|
|
||||||
body: |
|
|
||||||
This is a release of the Carp compiler on macOS.
|
|
||||||
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: ./releases/${{ steps.get_tag_name.outputs.VERSION }}.zip
|
|
||||||
asset_name: ${{ steps.get_tag_name.outputs.VERSION }}.zip
|
|
||||||
asset_content_type: application/zip
|
|
76
.github/workflows/release_windows.yml
vendored
76
.github/workflows/release_windows.yml
vendored
@ -1,76 +0,0 @@
|
|||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
||||||
|
|
||||||
name: Create Release (Windows)
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Create Release
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- name: Get tag name
|
|
||||||
id: get_tag_name
|
|
||||||
shell: bash
|
|
||||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
|
||||||
|
|
||||||
- name: Check out
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Install Scoop
|
|
||||||
run: |
|
|
||||||
iwr -useb get.scoop.sh | iex
|
|
||||||
echo "~\scoop\shims" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
echo "C:\ProgramData\scoop\shims" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
|
|
||||||
- name: Install Stack
|
|
||||||
run: scoop install stack
|
|
||||||
|
|
||||||
- name: Install Zip
|
|
||||||
run: scoop install zip --global
|
|
||||||
|
|
||||||
- uses: actions/cache@v1
|
|
||||||
name: Cache stack dependencies
|
|
||||||
with:
|
|
||||||
path: C:\\Users\\runneradmin\\AppData\\Local\\Programs\\stack
|
|
||||||
key: ${{ runner.os }}-stack-deps-${{ github.sha }}
|
|
||||||
restore-keys: ${{ runner.os }}-stack-deps
|
|
||||||
|
|
||||||
- uses: actions/cache@v1
|
|
||||||
name: Cache stack build
|
|
||||||
with:
|
|
||||||
path: C:\\Users\\runneradmin\\AppData\\Roaming\\stack\
|
|
||||||
key: ${{ runner.os }}-stack-build-${{ github.sha }}
|
|
||||||
restore-keys: ${{ runner.os }}-stack-build
|
|
||||||
|
|
||||||
- name: Install Clang
|
|
||||||
run: scoop install llvm --global
|
|
||||||
|
|
||||||
- name: Build and zip
|
|
||||||
shell: bash
|
|
||||||
run: "./scripts/release.sh ${{ steps.get_tag_name.outputs.VERSION }} --noprompt"
|
|
||||||
|
|
||||||
- name: Create Github Release
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ steps.get_tag_name.outputs.VERSION }}_Windows
|
|
||||||
release_name: Release ${{ steps.get_tag_name.outputs.VERSION }}_Windows
|
|
||||||
body: |
|
|
||||||
This is a release of the Carp compiler on Windows.
|
|
||||||
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: ./releases/${{ steps.get_tag_name.outputs.VERSION }}.zip
|
|
||||||
asset_name: ${{ steps.get_tag_name.outputs.VERSION }}.zip
|
|
||||||
asset_content_type: application/zip
|
|
Loading…
Reference in New Issue
Block a user