-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d59268
commit eb3364a
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,6 @@ tab_width = 4 | |
|
||
[*.yaml] | ||
indent_size = 2 | ||
|
||
[*.yml] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Make release when version tag is pushed | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: Build windows release | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release --target x86_64-pc-windows-msvc | ||
- name: Build linux release | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
use-cross: true | ||
command: build | ||
args: --release --target x86_64-unknown-linux-gnu | ||
- name: Create output folder | ||
run: | | ||
mkdir artifacts | ||
- name: Copy to release artifact dir | ||
run: | | ||
cp target/x86_64-pc-windows-msvc/release/hypnagogic-cli.exe artifacts/hypnagogic.exe | ||
cp target/x86_64-unknown-linux-gnu/release/hypnagogic-cli artifacts/hypnagogic | ||
cp -r examples artifacts/examples | ||
cp -r templates artifacts/templates | ||
cp README.md artifacts/README.md | ||
cp LICENSE.md artifacts/LICENSE.md | ||
- name: Zip release artifacts | ||
uses: vimtor/action-zip@v1 | ||
with: | ||
files: artifacts/ | ||
dest: hypnagogic-full-package.zip | ||
- name: Publish Release | ||
uses: marvinpinto/action-automatic-release@latest | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
prerelease: false | ||
files: | | ||
hypnagogic-full-package.zip | ||
artifacts/hypnagogic | ||
artifacts/hypnagogic.exe | ||