Skip to content

Commit

Permalink
chore: use github actions to release
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloxaf committed Dec 1, 2020
1 parent d394052 commit b6b0d8f
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 294 deletions.
118 changes: 118 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
on:
push:
tags:
- 'v*'

name: Release

jobs:
create_release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false

release-linux:
name: x86_64-unknown-linux-gnu
needs: create_release
runs-on: ubuntu-latest
steps:
- run: |
sudo apt-get update
sudo apt-get install libx11-xcb-dev libxcb-shape0-dev libxcb-xfixes0-dev
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --release
- id: get_name
run: |
echo ::set-output name=NAME::silicon-${GITHUB_REF/refs\/tags\//}-x86_64-unknown-linux-gnu.tar.xz
- run: |
tar czf ${{ steps.get_name.outputs.NAME }} ./target/release/silicon
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./${{ steps.get_name.outputs.NAME }}
asset_name: ${{ steps.get_name.outputs.NAME }}
asset_content_type: application/zip

release-macos:
name: x86_64-apple-darwin
needs: create_release
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --release
- id: get_name
run: |
echo ::set-output name=NAME::silicon-${GITHUB_REF/refs\/tags\//}-x86_64-apple-darwin.tar.xz
- run: |
tar czf ${{ steps.get_name.outputs.NAME }} ./target/release/silicon
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./${{ steps.get_name.outputs.NAME }}
asset_name: ${{ steps.get_name.outputs.NAME }}
asset_content_type: application/zip

release-windows:
name: x86_64-pc-windows-gnu
needs: create_release
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64-pc-windows-gnu]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target ${{ matrix.target }}
- id: get_name
run: |
echo ::set-output name=NAME::silicon-${GITHUB_REF/refs\/tags\//}-${{ matrix.target }}.tar.xz
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- run: |
shopt -s extglob
tar czf ${{ steps.get_name.outputs.NAME }} ./target/${{ matrix.target }}/release/silicon?(|.exe)
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./${{ steps.get_name.outputs.NAME }}
asset_name: ${{ steps.get_name.outputs.NAME }}
asset_content_type: application/zip
80 changes: 0 additions & 80 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
[![Crates.io](https://img.shields.io/crates/v/silicon.svg)](https://crates.io/crates/silicon)
[![Documentation](https://docs.rs/silicon/badge.svg)](https://docs.rs/silicon)
[![CI](https://github.com/Aloxaf/silicon/workflows/CI/badge.svg)](https://github.com/Aloxaf/silicon/actions?query=workflow%3ACI)
[![Linux Build Status](https://travis-ci.org/Aloxaf/silicon.svg?branch=master)](https://travis-ci.org/Aloxaf/silicon)
[![Windows build status](https://ci.appveyor.com/api/projects/status/github/Aloxaf/silicon?svg=true)](https://ci.appveyor.com/project/Aloxaf/silicon)
![License](https://img.shields.io/crates/l/silicon.svg)

Silicon is an alternative to [Carbon](https://github.com/dawnlabs/carbon) implemented in Rust.
Expand Down
77 changes: 0 additions & 77 deletions appveyor.yml

This file was deleted.

22 changes: 0 additions & 22 deletions ci/before_deploy.ps1

This file was deleted.

37 changes: 0 additions & 37 deletions ci/before_deploy.sh

This file was deleted.

47 changes: 0 additions & 47 deletions ci/install.sh

This file was deleted.

Loading

0 comments on commit b6b0d8f

Please sign in to comment.