Skip to content

Commit 4370922

Browse files
committed
Merge branch 'feature/add-github-cli-release-to-ci'
2 parents 5e1bf16 + 5f6fa19 commit 4370922

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on:
88

99
env:
1010
CARGO_TERM_COLOR: always
11-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
12-
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
1311

1412
jobs:
1513
test_and_publish:
@@ -23,11 +21,12 @@ jobs:
2321
- name: Build
2422
run: cargo build --profile release
2523
- name: Publish to crates.io
24+
env:
25+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
2626
run: cargo caw-publish
27-
# - name: Creating a zip file
28-
# run: zip http_status_code_check.zip target/release/http_status_code_check
29-
# - name: Publish to Github Release
30-
# uses: softprops/action-gh-release@v2
31-
# with:
32-
# files: http_status_code_check.zip
33-
# tag_name: ${{ steps.vars.cargo_pkg_version }}
27+
- name: Publish to Github Releases
28+
env:
29+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
30+
run: |
31+
ver=$(cat Cargo.toml | grep -e '^version = ".*"$' | sed 's/version = "\(.*\)"/\1/')
32+
gh release create -d --title v$ver --notes-file RELEASE.md $ver target/release/http_status_code_check

RELEASE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Release Notes for v0.1.1
2+
3+
testing Github Release CI workflow

0 commit comments

Comments
 (0)