Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Commit c9878f1

Browse files
authored
Merge pull request #21 from billyoung/feature/os_packaging
OS Packaging (deb/rpm)
2 parents 96b5b05 + 79a9b5c commit c9878f1

File tree

3 files changed

+76
-0
lines changed

3 files changed

+76
-0
lines changed

.github/workflows/package.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Package
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
7+
8+
jobs:
9+
package:
10+
runs-on: ubuntu-latest
11+
env:
12+
VERSION: ${{ github.ref }}
13+
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_API_TOKEN }}
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v1
17+
- name: Install Cross
18+
run: cargo install cross
19+
- name: Compile amd64
20+
run: cross build --target x86_64-unknown-linux-gnu --release
21+
- name: Compile arm64
22+
run: cross build --target armv7-unknown-linux-gnueabihf --release
23+
- name: Install NFPM
24+
run: curl -sfL https://install.goreleaser.com/github.com/goreleaser/nfpm.sh | sh
25+
- name: Package amd64 (Debian)
26+
run: ./bin/nfpm pkg --packager deb -f build/nfpm.amd64.yaml
27+
- name: Package arm64 (Debian)
28+
run: ./bin/nfpm pkg --packager deb -f build/nfpm.arm64.yaml
29+
- name: Package amd64 (RPM)
30+
run: ./bin/nfpm pkg --packager rpm -f build/nfpm.amd64.yaml
31+
- name: Package arm64 (RPM)
32+
run: ./bin/nfpm pkg --packager rpm -f build/nfpm.arm64.yaml
33+
- name: Push amd64 (Debian)
34+
run: curl -F "package[distro_version_id]=190" -F "package[package_file]=@$(ls wash_*_amd64.deb)" https://$PACKAGECLOUD_TOKEN:@packagecloud.io/api/v1/repos/wasmCloud/wascc/packages.json
35+
- name: Push arm64 (Debian)
36+
run: curl -F "package[distro_version_id]=190" -F "package[package_file]=@$(ls wash_*_arm64.deb)" https://$PACKAGECLOUD_TOKEN:@packagecloud.io/api/v1/repos/wasmCloud/wascc/packages.json
37+
- name: Push x86_64 (RPM)
38+
run: curl -F "package[distro_version_id]=204" -F "package[package_file]=@$(ls wash-*.x86_64.rpm)" https://$PACKAGECLOUD_TOKEN:@packagecloud.io/api/v1/repos/wasmCloud/wascc/packages.json
39+
- name: Push aarch64 (RPM)
40+
run: curl -F "package[distro_version_id]=204" -F "package[package_file]=@$(ls wash-*.aarch64.rpm)" https://$PACKAGECLOUD_TOKEN:@packagecloud.io/api/v1/repos/wasmCloud/wascc/packages.json

build/nfpm.amd64.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# NFPM: check https://nfpm.goreleaser.com/configuration for detailed usage
2+
# wash cli [amd64]
3+
4+
name: wash
5+
arch: amd64
6+
platform: linux
7+
version: ${VERSION}
8+
section: default
9+
priority: extra
10+
maintainer: Bill Young <[email protected]>
11+
description: |
12+
waSCC Shell
13+
A single CLI to handle all of your waSCC tooling needs
14+
vendor: waSCC
15+
homepage: https://wascc.dev
16+
license: Apache-2.0
17+
files:
18+
target/x86_64-unknown-linux-gnu/release/wash: "/usr/local/bin/wash"

build/nfpm.arm64.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# NFPM: check https://nfpm.goreleaser.com/configuration for detailed usage
2+
# wash cli [arm64]
3+
4+
name: wash
5+
arch: arm64
6+
platform: linux
7+
version: ${VERSION}
8+
section: default
9+
priority: extra
10+
maintainer: Bill Young <[email protected]>
11+
description: |
12+
waSCC Shell
13+
A single CLI to handle all of your waSCC tooling needs
14+
vendor: waSCC
15+
homepage: https://wascc.dev
16+
license: Apache-2.0
17+
files:
18+
target/armv7-unknown-linux-gnueabihf/release/wash: "/usr/local/bin/wash"

0 commit comments

Comments
 (0)