Skip to content

Merge pull request #74 from Stremio/bump-ver #89

Merge pull request #74 from Stremio/bump-ver

Merge pull request #74 from Stremio/bump-ver #89

Workflow file for this run

# Copyright (C) 2017-2024 Smart Code OOD 203358507
name: Linux Release
on:
push:
tags:
- 'v*'
jobs:
linux-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential libgtk-3-dev pkg-config libssl-dev libayatana-appindicator3-dev s3cmd
cargo install cargo-deb
cargo install cargo-generate-rpm
- name: Get current date
id: date
run: echo "TODAY_DATE=$(date +'%d %b %Y')" >> $GITHUB_OUTPUT
# Builds the deb linux package
- name: Build deb package
run: cargo deb -o target/debian/stremio-service_amd64.deb
- name: Upload deb release
uses: softprops/action-gh-release@v1
with:
# Use the same name as all releases!
name: Stremio Service ${{ github.ref_name }} (${{ steps.date.outputs.TODAY_DATE }})
draft: true
prerelease: false
fail_on_unmatched_files: true
files: |
target/debian/*.deb
# Builds the rpm linux package
- name: Build release
run: cargo build --release --features=bundled
- name: Strip debug symbols
run: strip -s target/release/stremio-service
- name: Build rpm package
run: cargo generate-rpm -o target/generate-rpm/stremio-service_x86_64.rpm
- name: Upload rpm to release
uses: softprops/action-gh-release@v1
with:
# Use the same name as all releases!
name: Stremio Service ${{ github.ref_name }} (${{ steps.date.outputs.TODAY_DATE }})
draft: true
prerelease: false
fail_on_unmatched_files: true
files: |
target/generate-rpm/*.rpm
- name: Upload build artifacts to AWS
shell: bash
env:
AWS_REGION: eu-west-1
run: |
# deb
s3cmd --acl-public --access_key=${{ secrets.AWS_ACCESS_KEY }} --region=$AWS_REGION --secret_key=${{ secrets.AWS_SECRET_KEY }} --force put target/debian/stremio-service_amd64.deb s3://stremio-artifacts/stremio-service/${{ github.ref_name }}/
# rpm
s3cmd --acl-public --access_key=${{ secrets.AWS_ACCESS_KEY }} --region=$AWS_REGION --secret_key=${{ secrets.AWS_SECRET_KEY }} --force put target/generate-rpm/stremio-service_x86_64.rpm s3://stremio-artifacts/stremio-service/${{ github.ref_name }}/