File tree Expand file tree Collapse file tree 3 files changed +45
-1
lines changed Expand file tree Collapse file tree 3 files changed +45
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish
2
+ on :
3
+ push :
4
+ branches : [master]
5
+ permissions :
6
+ contents : write
7
+
8
+ jobs :
9
+ publish :
10
+ name : Publish
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout repository
14
+ uses : actions/checkout@v3
15
+ - name : Get local crate version
16
+ id : local-version
17
+ run : cargo metadata --no-deps --format-version=1 | jq -r '.packages[0].version' | echo "VERSION=$(cat)" >> "${GITHUB_OUTPUT}"
18
+ - name : Get crates.io crate version
19
+ id : remote-version
20
+ run : curl 'https://index.crates.io/co/lo/colored' | jq -r '.vers' | tail -n 1 | echo "VERSION=$(cat)" >> "${GITHUB_OUTPUT}"
21
+ - name : Check if crates.io version is older than local version
22
+ id : needs-update
23
+ run : |
24
+ if ! printf '%s\n' "${{ steps.local-version.outputs.VERSION }}" "${{ steps.remote-version.outputs.VERSION }}" | sort -V | tail -n 1 | grep -Fw "${{ steps.remote-version.outputs.VERSION }}"; then
25
+ echo "UPDATE=true" >> "${GITHUB_OUTPUT}"
26
+ else
27
+ echo "UPDATE=false" >> "${GITHUB_OUTPUT}"
28
+ fi
29
+ - name : Install parse-changelog
30
+ if : steps.needs-update.outputs.UPDATE == 'true'
31
+ uses : taiki-e/install-action@parse-changelog
32
+ - name : Create GitHub release
33
+ if : steps.needs-update.outputs.UPDATE == 'true'
34
+ run : gh release create "v${{ steps.local-version.outputs.VERSION }}" -n "$(parse-changelog CHANGELOG.md "${{ steps.local-version.outputs.VERSION }}")"
35
+ env :
36
+ GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
37
+ - name : Publish to crates.io
38
+ if : steps.needs-update.outputs.UPDATE == 'true'
39
+ run : cargo publish
40
+ env :
41
+ CARGO_REGISTRY_TOKEN : " ${{ secrets.CARGO_REGISTRY_TOKEN }}"
Original file line number Diff line number Diff line change
1
+ # 2.0.1 (July 3, 2023)
2
+ - Add edition for future compatibility.
3
+ - Implement custom colors that can be stored in a variable.
1
4
2
5
# 2.0.0 (July 14, 2020)
3
6
- Add support for true colours.
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " colored"
3
3
description = " The most simple way to add colors in your terminal"
4
- version = " 2.0.0 "
4
+ version = " 2.0.1 "
5
5
edition = " 2021"
6
6
authors = [
" Thomas Wickham <[email protected] >" ]
7
7
license = " MPL-2.0"
You can’t perform that action at this time.
0 commit comments