Skip to content

Commit

Permalink
test: release
Browse files Browse the repository at this point in the history
  • Loading branch information
junjiemars committed Dec 28, 2020
1 parent 1482cad commit a1dd06e
Showing 1 changed file with 93 additions and 93 deletions.
186 changes: 93 additions & 93 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
tag_name: refs/releases
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
Expand All @@ -52,98 +52,98 @@ jobs:
asset_name: c-linux-${{ env._OS_ARCH_ }}.tgz
asset_content_type: application/zip

MacOS:
runs-on: macos-latest
strategy:
matrix:
include:
- CC: "clang"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Env
run: echo "_OS_ARCH_=$(uname -m)" >> $GITHUB_ENV
- name: Build and Test
env:
_RLS_CONFIG_: --with-release=yes --with-optimize=yes
run: |
./test.sh
- name: Tar Build Artifact
env:
_TAR_X_: .github/workflows/.tar.X
run: |
tar -X${{ env._TAR_X_ }} -cvzf c-macos-${{ env._OS_ARCH_ }}.tgz out/
- name: Create Release Ref
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
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: c-macos-${{ env._OS_ARCH_ }}.tgz
asset_name: c-macos-${{ env._OS_ARCH_ }}.tgz
asset_content_type: application/zip
# MacOS:
# runs-on: macos-latest
# strategy:
# matrix:
# include:
# - CC: "clang"
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Setup Env
# run: echo "_OS_ARCH_=$(uname -m)" >> $GITHUB_ENV
# - name: Build and Test
# env:
# _RLS_CONFIG_: --with-release=yes --with-optimize=yes
# run: |
# ./test.sh
# - name: Tar Build Artifact
# env:
# _TAR_X_: .github/workflows/.tar.X
# run: |
# tar -X${{ env._TAR_X_ }} -cvzf c-macos-${{ env._OS_ARCH_ }}.tgz out/
# - name: Create Release Ref
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# 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: c-macos-${{ env._OS_ARCH_ }}.tgz
# asset_name: c-macos-${{ env._OS_ARCH_ }}.tgz
# asset_content_type: application/zip

Windows:
runs-on: windows-latest
strategy:
matrix:
include:
- CC: "cl"
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # checkout history and tags
- name: Install Dependencies
uses: msys2/setup-msys2@v2
with:
update: true
install: git make tar mingw-w64-x86_64-gcc mingw-w64-x86_64
- name: Setup Env
run: echo "_OS_ARCH_=$(uname -m)" >> $GITHUB_ENV
- name: Build and Test
env:
_RLS_CONFIG_: --with-release=yes --with-optimize=yes
run: |
./test.sh
- name: Tar Build Artifact
env:
_TAR_X_: .github/workflows/.tar.X
run: |
tar -X${{ env._TAR_X_ }} -cvzf c-windows-${{ env._OS_ARCH_ }}.tgz out/
- name: Create Release Ref
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
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: c-windows-${{ env._OS_ARCH_ }}.tgz
asset_name: c-windows-${{ env._OS_ARCH_ }}.tgz
asset_content_type: application/zip
# Windows:
# runs-on: windows-latest
# strategy:
# matrix:
# include:
# - CC: "cl"
# defaults:
# run:
# shell: msys2 {0}
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0 # checkout history and tags
# - name: Install Dependencies
# uses: msys2/setup-msys2@v2
# with:
# update: true
# install: git make tar mingw-w64-x86_64-gcc mingw-w64-x86_64
# - name: Setup Env
# run: echo "_OS_ARCH_=$(uname -m)" >> $GITHUB_ENV
# - name: Build and Test
# env:
# _RLS_CONFIG_: --with-release=yes --with-optimize=yes
# run: |
# ./test.sh
# - name: Tar Build Artifact
# env:
# _TAR_X_: .github/workflows/.tar.X
# run: |
# tar -X${{ env._TAR_X_ }} -cvzf c-windows-${{ env._OS_ARCH_ }}.tgz out/
# - name: Create Release Ref
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# 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: c-windows-${{ env._OS_ARCH_ }}.tgz
# asset_name: c-windows-${{ env._OS_ARCH_ }}.tgz
# asset_content_type: application/zip

# EOF

0 comments on commit a1dd06e

Please sign in to comment.