-
-
Notifications
You must be signed in to change notification settings - Fork 4
176 lines (150 loc) · 5.53 KB
/
publish-crates.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: Release
on:
push:
tags:
- v*
permissions:
id-token: write
contents: write
jobs:
# Create a GitHub release for this tag
create_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Release
run: |
TAG=$(echo ${{ github.ref }} | sed 's/refs\/tags\///')
gh release create $TAG -t $TAG -n "Release $TAG"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-cli:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-14, windows-latest]
needs: create_release
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Build exon-cli
run: cargo build --release --manifest-path exon/exon-cli/Cargo.toml
- name: Upload Release Asset
shell: bash
run: |
TAG=$(echo ${{ github.ref }} | sed 's/refs\/tags\///')
if [ "${{ runner.os }}" = "Windows" ]; then
mv target/release/exon-cli.exe target/release/exon-cli-${{ runner.os }}-${{ runner.arch }}.exe
tar -czf target/release/exon-cli-${{ runner.os }}-${{ runner.arch }}.tar.gz target/release/exon-cli-${{ runner.os }}-${{ runner.arch }}.exe
else
mv target/release/exon-cli target/release/exon-cli-${{ runner.os }}-${{ runner.arch }}
tar -czf target/release/exon-cli-${{ runner.os }}-${{ runner.arch }}.tar.gz target/release/exon-cli-${{ runner.os }}-${{ runner.arch }}
fi
gh release upload $TAG target/release/exon-cli-${{ runner.os }}-${{ runner.arch }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Publish exon-common
run: |
cargo publish --manifest-path exon/exon-common/Cargo.toml
cargo clean
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-sam
run: cargo publish --manifest-path exon/exon-sam/Cargo.toml
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-bam
run: |
cargo publish --manifest-path exon/exon-bam/Cargo.toml
cargo clean
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-vcf
run: cargo publish --manifest-path exon/exon-vcf/Cargo.toml
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-bcf
run: |
cargo publish --manifest-path exon/exon-bcf/Cargo.toml
cargo clean
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-bed
run: cargo publish --manifest-path exon/exon-bed/Cargo.toml
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-bigwig
run: cargo publish --manifest-path exon/exon-bigwig/Cargo.toml
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-fasta
run: |
cargo publish --manifest-path exon/exon-fasta/Cargo.toml
cargo clean
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-fastq
run: cargo publish --manifest-path exon/exon-fastq/Cargo.toml
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-cram
run: cargo publish --manifest-path exon/exon-cram/Cargo.toml
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-fcs
run: |
cargo publish --manifest-path exon/exon-fcs/Cargo.toml
cargo clean
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-genbank
run: cargo publish --manifest-path exon/exon-genbank/Cargo.toml
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-gff
run: |
cargo publish --manifest-path exon/exon-gff/Cargo.toml
cargo clean
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-gtf
run: cargo publish --manifest-path exon/exon-gtf/Cargo.toml
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-sdf
run: |
cargo publish --manifest-path exon/exon-sdf/Cargo.toml
cargo clean
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-mzml
run: |
cargo publish --manifest-path exon/exon-mzml/Cargo.toml
cargo clean
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-io
run: |
cargo publish --manifest-path exon/exon-io/Cargo.toml
cargo clean
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish exon-core
run: cargo publish --manifest-path exon/exon-core/Cargo.toml
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}