ci: comment the new binary_artifact.yml workflow
parent
46c5a2c8fc
commit
067c8b39ba
|
@ -1,147 +1,147 @@
|
||||||
name: Build binary artifacts
|
## name: Build binary artifacts
|
||||||
|
##
|
||||||
on:
|
## on:
|
||||||
push:
|
## push:
|
||||||
branches:
|
## branches:
|
||||||
- main
|
## - main
|
||||||
- master
|
## - master
|
||||||
|
##
|
||||||
jobs:
|
## jobs:
|
||||||
build-linux:
|
## build-linux:
|
||||||
runs-on: ubuntu-latest
|
## runs-on: ubuntu-latest
|
||||||
strategy:
|
## strategy:
|
||||||
matrix:
|
## matrix:
|
||||||
compiler: [gcc]
|
## compiler: [gcc]
|
||||||
|
##
|
||||||
steps:
|
## steps:
|
||||||
- uses: actions/checkout@v1
|
## - uses: actions/checkout@v1
|
||||||
- name: Compile
|
## - name: Compile
|
||||||
env:
|
## env:
|
||||||
CC: ${{ matrix.compiler }}
|
## CC: ${{ matrix.compiler }}
|
||||||
run: make
|
## run: make
|
||||||
- name: Create artifact
|
## - name: Create artifact
|
||||||
uses: actions/upload-artifact@v2
|
## uses: actions/upload-artifact@v2
|
||||||
with:
|
## with:
|
||||||
name: linux
|
## name: linux
|
||||||
path: |
|
## path: |
|
||||||
.
|
## .
|
||||||
!./.git
|
## !./.git
|
||||||
!./.ctags.d
|
## !./.ctags.d
|
||||||
!./.github
|
## !./.github
|
||||||
!./vc
|
## !./vc
|
||||||
!./v_old
|
## !./v_old
|
||||||
- name: Create binary only artifact
|
## - name: Create binary only artifact
|
||||||
uses: actions/upload-artifact@v2
|
## uses: actions/upload-artifact@v2
|
||||||
with:
|
## with:
|
||||||
name: linux-binary
|
## name: linux-binary
|
||||||
path: ./v
|
## path: ./v
|
||||||
|
##
|
||||||
build-macos:
|
## build-macos:
|
||||||
runs-on: macos-latest
|
## runs-on: macos-latest
|
||||||
strategy:
|
## strategy:
|
||||||
matrix:
|
## matrix:
|
||||||
compiler: [clang]
|
## compiler: [clang]
|
||||||
|
##
|
||||||
steps:
|
## steps:
|
||||||
- uses: actions/checkout@v1
|
## - uses: actions/checkout@v1
|
||||||
- name: Compile
|
## - name: Compile
|
||||||
env:
|
## env:
|
||||||
CC: ${{ matrix.compiler }}
|
## CC: ${{ matrix.compiler }}
|
||||||
run: make
|
## run: make
|
||||||
- name: Create artifact
|
## - name: Create artifact
|
||||||
uses: actions/upload-artifact@v2
|
## uses: actions/upload-artifact@v2
|
||||||
with:
|
## with:
|
||||||
name: macos
|
## name: macos
|
||||||
path: |
|
## path: |
|
||||||
.
|
## .
|
||||||
!./.git
|
## !./.git
|
||||||
!./.ctags.d
|
## !./.ctags.d
|
||||||
!./.github
|
## !./.github
|
||||||
!./vc
|
## !./vc
|
||||||
!./v_old
|
## !./v_old
|
||||||
- name: Create binary only artifact
|
## - name: Create binary only artifact
|
||||||
uses: actions/upload-artifact@v2
|
## uses: actions/upload-artifact@v2
|
||||||
with:
|
## with:
|
||||||
name: macos-binary
|
## name: macos-binary
|
||||||
path: ./v
|
## path: ./v
|
||||||
|
##
|
||||||
build-windows:
|
## build-windows:
|
||||||
runs-on: windows-latest
|
## runs-on: windows-latest
|
||||||
|
##
|
||||||
steps:
|
## steps:
|
||||||
- uses: actions/checkout@v1
|
## - uses: actions/checkout@v1
|
||||||
- uses: msys2/setup-msys2@v2
|
## - uses: msys2/setup-msys2@v2
|
||||||
- name: Compile
|
## - name: Compile
|
||||||
run: ./make.bat
|
## run: ./make.bat
|
||||||
- name: Create artifact
|
## - name: Create artifact
|
||||||
uses: actions/upload-artifact@v2
|
## uses: actions/upload-artifact@v2
|
||||||
with:
|
## with:
|
||||||
name: windows
|
## name: windows
|
||||||
path: |
|
## path: |
|
||||||
.
|
## .
|
||||||
!./.git
|
## !./.git
|
||||||
!./.ctags.d
|
## !./.ctags.d
|
||||||
!./.github
|
## !./.github
|
||||||
!./vc
|
## !./vc
|
||||||
!./v_old
|
## !./v_old
|
||||||
- name: Create binary only artifact
|
## - name: Create binary only artifact
|
||||||
uses: actions/upload-artifact@v2
|
## uses: actions/upload-artifact@v2
|
||||||
with:
|
## with:
|
||||||
name: windows-binary
|
## name: windows-binary
|
||||||
path: ./v.exe
|
## path: ./v.exe
|
||||||
|
##
|
||||||
release:
|
## release:
|
||||||
name: Create Github Release
|
## name: Create Github Release
|
||||||
needs: [build-linux, build-windows, build-macos]
|
## needs: [build-linux, build-windows, build-macos]
|
||||||
runs-on: ubuntu-latest
|
## runs-on: ubuntu-latest
|
||||||
steps:
|
## steps:
|
||||||
- name: Remove old tag
|
## - name: Remove old tag
|
||||||
uses: dev-drprasad/delete-tag-and-release@v0.1.2
|
## uses: dev-drprasad/delete-tag-and-release@v0.1.2
|
||||||
with:
|
## with:
|
||||||
delete_release: true
|
## delete_release: true
|
||||||
tag_name: latest-commit
|
## tag_name: latest-commit
|
||||||
env:
|
## env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
## GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Create Release
|
## - name: Create Release
|
||||||
id: create_release
|
## id: create_release
|
||||||
uses: ncipollo/release-action@v1
|
## uses: ncipollo/release-action@v1
|
||||||
with:
|
## with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
## token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
tag: latest-commit
|
## tag: latest-commit
|
||||||
name: Prebuilt binaries of the latest commit
|
## name: Prebuilt binaries of the latest commit
|
||||||
commit: ${{ github.sha }}
|
## commit: ${{ github.sha }}
|
||||||
draft: false
|
## draft: false
|
||||||
prerelease: true
|
## prerelease: true
|
||||||
|
##
|
||||||
publish:
|
## publish:
|
||||||
needs: [release]
|
## needs: [release]
|
||||||
runs-on: ubuntu-latest
|
## runs-on: ubuntu-latest
|
||||||
strategy:
|
## strategy:
|
||||||
matrix:
|
## matrix:
|
||||||
version: [linux, macos, windows]
|
## version: [linux, macos, windows]
|
||||||
steps:
|
## steps:
|
||||||
- uses: actions/checkout@v1
|
## - uses: actions/checkout@v1
|
||||||
- name: Fetch artifacts
|
## - name: Fetch artifacts
|
||||||
uses: actions/download-artifact@v1
|
## uses: actions/download-artifact@v1
|
||||||
with:
|
## with:
|
||||||
name: ${{ matrix.version }}
|
## name: ${{ matrix.version }}
|
||||||
path: ./${{ matrix.version }}
|
## path: ./${{ matrix.version }}
|
||||||
- name: Build
|
## - name: Build
|
||||||
run: zip -r ${{ matrix.version }}.zip ./${{ matrix.version }}/*
|
## run: zip -r ${{ matrix.version }}.zip ./${{ matrix.version }}/*
|
||||||
- name: Get release
|
## - name: Get release
|
||||||
id: get_release_info
|
## id: get_release_info
|
||||||
uses: leahlundqvist/get-release@v1.3.1
|
## uses: leahlundqvist/get-release@v1.3.1
|
||||||
env:
|
## env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
## GITHUB_TOKEN: ${{ github.token }}
|
||||||
with:
|
## with:
|
||||||
tag_name: latest-commit
|
## tag_name: latest-commit
|
||||||
- name: Upload Release Asset
|
## - name: Upload Release Asset
|
||||||
id: upload-release-asset
|
## id: upload-release-asset
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
## uses: actions/upload-release-asset@v1.0.1
|
||||||
env:
|
## env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
## GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
## with:
|
||||||
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
|
## upload_url: ${{ steps.get_release_info.outputs.upload_url }}
|
||||||
asset_path: ./${{ matrix.version }}.zip
|
## asset_path: ./${{ matrix.version }}.zip
|
||||||
asset_name: ${{ matrix.version }}.zip
|
## asset_name: ${{ matrix.version }}.zip
|
||||||
asset_content_type: application/zip
|
## asset_content_type: application/zip
|
||||||
|
|
Loading…
Reference in New Issue