-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (39 loc) · 1.33 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Rust
on:
push:
branches: [ "main", "main-dev" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Test with environment variables
run: echo $TAG_NAME - $RELEASE_NAME
env:
TAG_NAME: latest-${{ steps.date.outputs.date }}
RELEASE_NAME: latest-release-${{ steps.date.outputs.date }}
- uses: actions/checkout@v4
- run: curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 && mv tailwindcss-linux-x64 tailwindcss && chmod +x tailwindcss
- run: cd frontend && npm install && npm install rollup --global && cd ..
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
- run: |
cargo build --release
cp target/release/taskwarrior-web taskwarrior-web
tar czf tw-web-$RELEASE_NAME.tar.gz dist taskwarrior-web
- name: Release
uses: softprops/action-gh-release@v2
with:
- name: Publish Release
uses: softprops/action-gh-release@v2
with:
prerelease: true
tag_name: ${{ env.TAG_NAME }}
files: tw-web-$RELEASE_NAME.tar.gz