Skip to content

Commit 1542898

Browse files
committed
refactor: Redesign API for serde support
Closes #25, #32, #39 BREAKING CHANGE: API redesigned for serde & Stream support & msrv bumped to 1.75. See [MIGRATING/v0.6.0.md](https://github.com/Alorel/rust-indexed-db/blob/v0.6.0/MIGRATING/v0.6.0.md) for details.
1 parent a501fca commit 1542898

File tree

186 files changed

+13189
-3823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+13189
-3823
lines changed

Diff for: .github/actions/changelog/action.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Generate changelog
2+
description: Generate the changelog
3+
outputs:
4+
release-type:
5+
description: Release type
6+
value: ${{ steps.log.outputs.release-type }}
7+
version:
8+
description: Next version
9+
value: ${{ steps.log.outputs.next-version }}
10+
issues-closed:
11+
description: Issues closed
12+
value: ${{ steps.log.outputs.issues-closed }}
13+
changelog:
14+
description: Changelog value
15+
value: ${{ steps.log.outputs.changelog }}
16+
should-release:
17+
description: Should release
18+
value: ${{ steps.log.outputs.should-release }}
19+
runs:
20+
using: composite
21+
steps:
22+
- name: Conditional args
23+
id: args
24+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
25+
shell: bash
26+
run: >
27+
echo "before=${{ github.ref_name }}" >> $GITHUB_OUTPUT &&
28+
echo "until=${{ github.ref_name }}" >> $GITHUB_OUTPUT
29+
30+
- name: Get last tag
31+
id: last-tag
32+
uses: alorel-actions/semantic-release-lite/last-tag@v0
33+
with:
34+
before: ${{ steps.args.outputs.before }}
35+
36+
- name: Generate changelog
37+
id: log
38+
uses: alorel-actions/semantic-release-lite/generate-changelog@v0
39+
with:
40+
last-tag: ${{ steps.last-tag.outputs.last-tag }}
41+
from: ${{ steps.last-tag.outputs.last-tag }}
42+
until: ${{ steps.args.outputs.until || github.sha }}
43+
stay-at-zero: true
44+
minor-types: |
45+
feat: Features
46+
rm: Removals
47+
patch-types: |
48+
fix: Bug Fixes
49+
perf: Performance
50+
chore: Maintenance
51+
deps: Dependency updates
52+
refactor: Refactors
53+
docs: Documentation
54+
trivial-types: |
55+
ci: CI & Build
56+
build: CI & Build

Diff for: .github/actions/prep-release/action.yml

-30
This file was deleted.

Diff for: .github/actions/release/action.yml

-33
This file was deleted.

Diff for: .github/workflows/_test.yml

-71
This file was deleted.

Diff for: .github/workflows/release-crate.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release (crates.io)
2+
concurrency: release-crate
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
release:
13+
name: Release (crates.io)
14+
runs-on: ubuntu-latest
15+
environment: crates-io
16+
env:
17+
CARGO_INCREMENTAL: 0
18+
steps:
19+
- uses: actions/checkout@v4
20+
name: Checkout
21+
22+
- name: Init toolchain
23+
uses: alorel-actions/cargo/init@v1
24+
with:
25+
cache-prefix: release
26+
27+
- name: Publish crate
28+
run: cargo publish --locked --token ${{ secrets.CRATES_IO_TOKEN }}

Diff for: .github/workflows/release.yml

+45-42
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
1-
name: Release
2-
concurrency: release
1+
name: Release (GitHub)
2+
concurrency: release-git
33
on:
4-
workflow_dispatch: {}
4+
workflow_dispatch: { }
55

66
permissions:
77
contents: read
88

99
env:
1010
CARGO_INCREMENTAL: 0
11-
RUSTFLAGS: --deny warnings
1211

1312
jobs:
14-
test:
15-
name: Test
16-
uses: ./.github/workflows/_test.yml
17-
18-
release:
19-
name: Release
20-
needs:
21-
- test
13+
git:
14+
name: Git release
2215
runs-on: ubuntu-latest
23-
environment: crates-io
16+
environment: github
2417
permissions:
2518
contents: write
19+
outputs:
20+
issues-closed: ${{ steps.changelog.outputs.issues-closed }}
21+
version: ${{ steps.changelog.outputs.version }}
2622
steps:
2723
- uses: actions/checkout@v4
2824
name: Checkout
@@ -31,37 +27,44 @@ jobs:
3127
fetch-tags: true
3228
token: ${{ secrets.GH_TOKEN }}
3329

34-
- name: Parse
35-
id: parse
36-
uses: alorel-actions/semantic-release-lite@v0
30+
- name: Git identity
31+
uses: alorel-actions/git-ident@v1
32+
33+
- name: Generate changelog
34+
id: changelog
35+
uses: ./.github/actions/changelog
36+
37+
- name: Init toolchain
38+
uses: alorel-actions/cargo/init@v1
39+
with:
40+
cache-prefix: release
41+
42+
- name: cargo-bump
43+
uses: alorel-actions/cargo/bump@v1
3744
with:
38-
stay-at-zero: true
39-
minor-types: |
40-
feat: Features
41-
patch-types: |
42-
fix: Bug Fixes
43-
trivial-types: |
44-
chore: Maintenance
45-
deps: Dependency updates
46-
ci: CI & Build
47-
build: CI & Build
48-
refactor: Refactors
49-
docs: Documentation
50-
perf: Performance
45+
release-type: ${{ steps.changelog.outputs.release-type }}
5146

52-
- name: Prep release
53-
if: ${{ steps.parse.outputs.should-release }}
54-
id: prep
55-
uses: ./.github/actions/prep-release
47+
- name: Git release
48+
uses: alorel-actions/cargo/release-git@v1
5649
with:
57-
release-type: ${{ steps.parse.outputs.release-type }}
58-
version: ${{ steps.parse.outputs.next-version }}
50+
version: ${{ steps.changelog.outputs.version }}
51+
changelog: ${{ steps.changelog.outputs.changelog }}
5952

60-
- name: Release
61-
if: ${{ steps.prep.outputs.in-sync }}
62-
uses: ./.github/actions/release
53+
notify:
54+
name: Notify closed issues
55+
needs:
56+
- git
57+
if: ${{ needs.git.outputs.issues-closed }}
58+
runs-on: ubuntu-latest
59+
environment: github
60+
permissions:
61+
contents: write
62+
steps:
63+
- name: Notify
64+
if: ${{ needs.git.outputs.issues-closed }}
65+
uses: alorel-actions/semantic-release-lite/notify@v0
6366
with:
64-
version: ${{ steps.parse.outputs.next-version }}
65-
changelog: ${{ steps.parse.outputs.changelog }}
66-
issues-closed: ${{ steps.parse.outputs.issues-closed }}
67-
crates-io-token: ${{ secrets.CRATES_IO_TOKEN }}
67+
tag: ${{ needs.git.outputs.version }}
68+
issues: ${{ needs.git.outputs.issues-closed }}
69+
allow-out-of-sync: true
70+
gh-token: ${{ secrets.GH_TOKEN }}

0 commit comments

Comments
 (0)