1
0
Fork 0
mirror of https://github.com/reisub0/sway-alttab synced 2024-05-27 17:46:04 +02:00
sway-alttab/.github/workflows/release-i3.yml
reisub0 f4214cb5ad
Adds i3 support (experimental)
Signed-off-by: reisub0 <reisub0@gmail.com>
2020-07-19 15:48:14 +05:30

107 lines
2.1 KiB
YAML

name: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1
with:
ref: i3
- name: Cargo check
run: cargo check --verbose
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1
with:
ref: i3
- name: Cargo test
run: cargo test --verbose
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
ref: i3
- name: Build
run: cargo build --verbose
release-build:
name: Release Build
runs-on: ubuntu-latest
needs: [check, test, build]
steps:
- name: Checkout
uses: actions/checkout@v1
with:
ref: i3
- name: Build Release
run: cargo build --release --verbose
- name: Strip unnecessary symbols
run: strip ./target/release/i3-alttab
- name: Upload build artifact
uses: actions/upload-artifact@v1
with:
name: binary
path: ./target/release/i3-alttab
release:
name: Release
runs-on: ubuntu-latest
needs: [release-build]
steps:
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: binary
- name: Create 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 }}
draft: false
prerelease: false
# - name: Print tree
# shell: bash
# run: |
# echo HELLO
# tree -CAhF --dirsfirst
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: binary/i3-alttab
asset_name: i3-alttab
asset_content_type: application/octet-stream