Skip to content

Commit 81d2438

Browse files
committed
ci
1 parent 33dcaa9 commit 81d2438

File tree

3 files changed

+42
-36
lines changed

3 files changed

+42
-36
lines changed

.github/workflows/docs.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ env:
1010
CARGO_TERM_COLOR: always
1111
RUST_BACKTRACE: 1
1212
PROJECT_NAME: csv_parser_rs
13+
DOCS_BODY: "${{ github.event.release.body }}"
1314
jobs:
1415
docs:
1516
name: "Docs - docs"
@@ -129,3 +130,40 @@ jobs:
129130
if-no-files-found: 'error'
130131
compression-level: '9'
131132
overwrite: 'true'
133+
publish-docs:
134+
name: "Docs - publish-docs"
135+
permissions:
136+
contents: write
137+
runs-on: ubuntu-latest
138+
needs: [package-docs-unix, package-docs-windows]
139+
steps:
140+
- run: |
141+
echo 'DOCS_BODY<<EOF' >> $GITHUB_ENV
142+
echo "From commit: ${GITHUB_SHA:0:8}" >> $GITHUB_ENV
143+
echo "Generated on: $(date -u +"%Y-%m-%d %H:%M") UTC" >> $GITHUB_ENV
144+
echo "EOF" >> $GITHUB_ENV
145+
- name: "Checkout sources"
146+
uses: actions/checkout@v4
147+
- uses: actions/download-artifact@v4
148+
id: artifact-download-step
149+
with:
150+
merge-multiple: true
151+
- name: "Update tag for docs"
152+
run: |
153+
git config user.name "github-actions[bot]"
154+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
155+
git tag --force docs && git push --force origin tag docs
156+
- name: "Docs - draft"
157+
uses: softprops/action-gh-release@master
158+
with:
159+
tag_name: "[${{ github.ref_name }} Docs]"
160+
# repository: ${{ github.repository }}
161+
fail_on_unmatched_files: true
162+
draft: true
163+
files: |
164+
${{ env.PROJECT_NAME }}-*
165+
name: "[${{ github.ref_name }} Docs]"
166+
body: ${{ env.DOCS_BODY }}
167+
target_commitish: ${{ github.sha }}
168+
generate_release_notes: false
169+
# body_path: ${{ github.workspace }}-CHANGELOG.txt ## For adding changelog content

.github/workflows/draft.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ env:
1515
RUST_BACKTRACE: 1
1616
PROJECT_NAME: csv_parser_rs
1717
NIGHTLY_BODY: ${{ github.event.release.body }}
18+
DRAFT_BODY: ""
1819
jobs:
1920
build-unix:
2021
name: "Draft - build-unix"
@@ -108,15 +109,14 @@ jobs:
108109
compression-level: '9'
109110
# overwrite: 'true'
110111
draft:
111-
# TODO: swap these back when working
112-
# if: startsWith(github.ref, 'refs/tags/')
113-
if: always()
112+
if: startsWith(github.ref, 'refs/tags/')
114113
permissions:
115114
contents: write
116115
runs-on: ubuntu-latest
117116
needs: [build-unix, build-windows]
118117
steps:
119-
- uses: actions/checkout@v4
118+
- name: "Checkout sources"
119+
uses: actions/checkout@v4
120120
- uses: actions/download-artifact@v4
121121
id: artifact-download-step
122122
with:
@@ -125,8 +125,6 @@ jobs:
125125
uses: softprops/action-gh-release@master
126126
with:
127127
# repository: ${{ github.repository }}
128-
# TODO: and when done - remove this
129-
prerelease: true
130128
fail_on_unmatched_files: true
131129
draft: true
132130
# make_latest: true ## Drafts & prereleases cannot be set as `make_latest:`

.github/workflows/publish.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)