Skip to content

Commit e104eb0

Browse files
committed
fix: use a single release github action workflow
1 parent 545b88e commit e104eb0

File tree

2 files changed

+49
-54
lines changed

2 files changed

+49
-54
lines changed

.github/workflows/CD.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/Release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66

77
jobs:
88
release:
9+
outputs:
10+
version: ${{ steps.release.outputs.version }}
911
runs-on: ubuntu-latest
1012
name: Perform release
1113

@@ -52,3 +54,50 @@ jobs:
5254
with:
5355
body_path: GITHUB_CHANGELOG.md
5456
tag_name: ${{ steps.release.outputs.version }}
57+
58+
binary:
59+
needs: release
60+
name: Publish binary for ${{ matrix.os }}
61+
runs-on: ${{ matrix.os }}
62+
strategy:
63+
matrix:
64+
# This should work with only the `include`s but it currently doesn't because of this bug:
65+
# https://github.community/t5/How-to-use-Git-and-GitHub/GitHub-Actions-Matrix-options-dont-work-as-documented/td-p/29558
66+
target: [ x86_64-osx, x86_64-unknown-linux-musl, armv7-unknown-linux-musleabihf, armv7-linux-androideabi, aarch64-linux-android ]
67+
include:
68+
- os: macos-latest
69+
target: x86_64-osx
70+
- os: ubuntu-latest
71+
target: x86_64-unknown-linux-musl
72+
- os: ubuntu-latest
73+
target: armv7-unknown-linux-musleabihf
74+
- os: ubuntu-latest
75+
target: armv7-linux-androideabi
76+
- os: ubuntu-latest
77+
target: aarch64-linux-android
78+
79+
steps:
80+
- name: install open-ssl
81+
if: ${{ runner.os == 'Linux' }}
82+
run: |
83+
sudo apt-get -y install libssl-dev pkg-config musl-dev musl-tools
84+
85+
- uses: hecrj/setup-rust-action@v1
86+
with:
87+
rust-version: stable
88+
89+
- uses: actions/checkout@v1
90+
- name: Build
91+
run: ci/action.sh release ${{ matrix.target }}
92+
93+
- name: Get the version
94+
id: get_version
95+
run: echo ::set-output name=VERSION::${needs.release.outputs.version}
96+
97+
- name: Upload binaries to release
98+
uses: svenstaro/upload-release-action@v1-release
99+
with:
100+
repo_token: ${{ secrets.GITHUB_TOKEN }}
101+
file: target/tar/bombadil.tar.gz
102+
tag: ${{ github.ref }}
103+
asset_name: bombadil-${{ steps.get_version.outputs.VERSION }}-${{ matrix.target }}.tar.gz

0 commit comments

Comments
 (0)