Skip to content

Commit a9af824

Browse files
authored
Add Github Actions pipeline (#1)
1 parent b7bb204 commit a9af824

File tree

5 files changed

+202
-0
lines changed

5 files changed

+202
-0
lines changed

.github/workflows/release.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
on:
2+
push:
3+
tags:
4+
- "v*"
5+
6+
name: Create Release
7+
env:
8+
PROJECT_NAME: ${{ github.event.repository.name }}
9+
10+
jobs:
11+
build:
12+
name: Build application
13+
runs-on: ${{ matrix.runs_on }}
14+
strategy:
15+
matrix:
16+
include:
17+
- target: x86_64-unknown-linux-gnu
18+
runs_on: ubuntu-latest
19+
- target: x86_64-pc-windows-msvc
20+
runs_on: windows-latest
21+
- target: x86_64-apple-darwin
22+
runs_on: macos-latest
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v2
26+
27+
- name: Install Rust toolchain "${{ matrix.target }}"
28+
uses: actions-rs/toolchain@v1
29+
with:
30+
toolchain: stable
31+
target: ${{ matrix.target }}
32+
override: true
33+
profile: minimal
34+
35+
- name: Build binary "${{ matrix.target }}"
36+
uses: actions-rs/cargo@v1
37+
with:
38+
use-cross: true
39+
command: build
40+
args: --release --verbose --target=${{ matrix.target }}
41+
42+
- name: Test binary "${{ matrix.target }}"
43+
uses: actions-rs/cargo@v1
44+
with:
45+
use-cross: true
46+
command: test
47+
args: --release --verbose --target=${{ matrix.target }}
48+
49+
- name: Rename binary file
50+
shell: bash
51+
run: |
52+
origin="$(find target/${{ matrix.target }}/release -maxdepth 1 -perm -111 -iname "${{ env.PROJECT_NAME }}*")"
53+
dest="${origin/${{ env.PROJECT_NAME}}/${{ env.PROJECT_NAME}}-${{ matrix.target}}}"
54+
mv "$origin" "$dest"
55+
- name: Upload Artifact
56+
uses: actions/upload-artifact@v2
57+
with:
58+
name: ${{ matrix.target }}
59+
path: ./target/${{ matrix.target }}/release/${{ env.PROJECT_NAME }}-${{ matrix.target }}*
60+
61+
release_and_publish:
62+
name: Create release and publish
63+
needs: [build]
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Download all artifacts
67+
uses: actions/download-artifact@v2
68+
with:
69+
path: artifacts
70+
71+
- name: Create Release And Publish These Artifacts
72+
uses: softprops/action-gh-release@v1
73+
with:
74+
name: Release ${{ env.PROJECT_NAME }} ${{ github.ref }}
75+
prerelease: true
76+
files: |
77+
artifacts/*/*
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/rust.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build and test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
build:
16+
name: Build application
17+
runs-on: ${{ matrix.runs_on }}
18+
strategy:
19+
matrix:
20+
include:
21+
- target: x86_64-unknown-linux-gnu
22+
runs_on: ubuntu-latest
23+
- target: x86_64-pc-windows-msvc
24+
runs_on: windows-latest
25+
- target: x86_64-apple-darwin
26+
runs_on: macos-latest
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v2
30+
31+
- name: Install Rust toolchain "${{ matrix.target }}"
32+
uses: actions-rs/toolchain@v1
33+
with:
34+
toolchain: stable
35+
target: ${{ matrix.target }}
36+
override: true
37+
profile: minimal
38+
39+
- name: Build binary "${{ matrix.target }}"
40+
uses: actions-rs/cargo@v1
41+
with:
42+
use-cross: true
43+
command: build
44+
args: --verbose --target=${{ matrix.target }}
45+
46+
- name: Test binary "${{ matrix.target }}"
47+
uses: actions-rs/cargo@v1
48+
with:
49+
use-cross: true
50+
command: test
51+
args: --verbose --target=${{ matrix.target }}

Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ dirs = "3.0"
2121
simple-error = "0.2"
2222
regex = "1"
2323
reqwest = { version = "0.10", features = ["blocking"] }
24+
openssl = { version = "0.10", features = ["vendored"] }
2425
html5ever = "0.25"
2526
markup5ever_rcdom = "0.1"
2627
zip = "0.5"

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# ESO Addon Manager
2+
3+
This repository holds a simple command line ESO Addon Manager written in Rust. With it you can manage addons from [esoui.com](https://www.esoui.com/). It uses a single config file to configure the desired addons.
4+
5+
- [ESO Addon Manager](#eso-addon-manager)
6+
- [Usage](#usage)
7+
- [Configuration](#configuration)
8+
- [Install and update addon](#install-and-update-addon)
9+
- [List addons and show missing dependencies](#list-addons-and-show-missing-dependencies)
10+
- [Remove addons](#remove-addons)
11+
12+
## Usage
13+
14+
### Configuration
15+
16+
Create a config file in your user directory:
17+
- Linux - `$HOME/.eso-addons.toml`
18+
19+
20+
```
21+
# addonDir - path of the ESO addon directory
22+
addonDir = "/home/damian/Games/the-elder-scrolls-online-tamriel-unlimited/drive_c/users/damian/My Documents/Elder Scrolls Online/live/AddOns"
23+
24+
# addons - list of addons to be installed
25+
# name - name of addon, must correspond to the addon directory name
26+
# url - download URL of the addon. It's the URL of the 'Download' button on ESOUI
27+
# TODO: dependency - is the addon only required as a dependency for another addon. Based on this Addon Manager will remove unused addons
28+
29+
[[addons]]
30+
name = "SkyShards"
31+
url = "https://www.esoui.com/downloads/download128-SkyShards.html"
32+
dependency = false
33+
34+
[[addons]]
35+
name = "HarvestMap"
36+
url = "https://www.esoui.com/downloads/download57-HarvestMap.html"
37+
dependency = false
38+
```
39+
40+
### Install and update addon
41+
42+
Execute `eso-addons install`, to install and updated all the plugins.
43+
44+
### List addons and show missing dependencies
45+
46+
Execute `eso-addons list`. This will show the installation status of all addons and detect missing dependencies for the installed addons.
47+
48+
### Remove addons
49+
50+
The Addon Manager can remove addons, which are present in the ESO addon dir, but not listed in the configuration file.
51+
52+
To get the list of addons to be removed, execute:
53+
```
54+
eso-addons clean
55+
```
56+
57+
To remove the addons, execute:
58+
```
59+
eso-addons clean --remove
60+
```

0 commit comments

Comments
 (0)