Skip to content

Commit a6b9974

Browse files
Merge #96
96: make releases easier r=Emilgardis a=Emilgardis also releases 0.9.0 Co-authored-by: Emil Gardström <emil.gardstrom@gmail.com>
2 parents 2acb6aa + 2bd351c commit a6b9974

File tree

11 files changed

+457
-71
lines changed

11 files changed

+457
-71
lines changed

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[alias]
2+
xtask = "run --package xtask --"

.github/workflows/ci.yml

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,33 @@ env:
33
CI_TWITCH_OAUTH2_FEATURES: "all mock_api"
44
on:
55
pull_request:
6-
branches: [master]
6+
branches: [main]
77
types: [opened, reopened, synchronize]
88
push:
9-
branches: [master, staging, trying]
9+
branches: [main, staging, trying]
1010
jobs:
1111
ci:
1212
name: CI
13-
needs: [test, fmt, clippy, docs]
13+
needs: [test, fmt, clippy, docs, release]
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Done
1717
run: exit 0
18+
release:
19+
name: Release
20+
runs-on: ubuntu-latest
21+
needs: [test, fmt, clippy, docs]
22+
steps:
23+
- uses: actions/checkout@v3
24+
with:
25+
submodules: recursive
26+
fetch-depth: 0 # fetch tags for publish
27+
# ssh-key: "${{ secrets.COMMIT_KEY }}" # use deploy key to trigger workflow on tag
28+
- uses: Swatinem/rust-cache@v2
29+
- run: cargo xtask release
30+
env:
31+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
1833
test:
1934
name: Tests
2035
strategy:
@@ -48,7 +63,7 @@ jobs:
4863
uses: actions-rs/cargo@v1
4964
with:
5065
command: test
51-
args: --all-targets --features "${{ env.CI_TWITCH_OAUTH2_FEATURES }}"
66+
args: --all-targets --features "${{ env.CI_TWITCH_OAUTH2_FEATURES }}" --workspace
5267
fmt:
5368
name: Rustfmt
5469
runs-on: ubuntu-latest
@@ -91,11 +106,11 @@ jobs:
91106
with:
92107
command: clippy
93108
args: --locked
94-
- name: Run clippy --all-targets --all-features
109+
- name: Run clippy --all-targets --all-features --workspace
95110
uses: actions-rs/cargo@v1
96111
with:
97112
command: clippy
98-
args: --locked --all-targets --all-features
113+
args: --locked --all-targets --all-features --workspace
99114
docs:
100115
name: Docs
101116
runs-on: ubuntu-latest
@@ -130,21 +145,3 @@ jobs:
130145
with:
131146
command: doc
132147
args: --locked --no-deps --features "${{ env.CI_TWITCH_OAUTH2_FEATURES }}"
133-
release:
134-
name: Release
135-
runs-on: ubuntu-latest
136-
if: startsWith(github.head_ref, 'release-') || startsWith(github.ref, 'release-')
137-
steps:
138-
- uses: actions/checkout@v2
139-
with:
140-
submodules: false
141-
- uses: actions-rs/toolchain@v1
142-
with:
143-
profile: minimal
144-
toolchain: nightly
145-
override: true
146-
- name: Run dry run publish
147-
uses: actions-rs/cargo@v1
148-
with:
149-
command: publish
150-
args: --dry-run --features "${{ env.CI_TWITCH_OAUTH2_FEATURES }}"

.github/workflows/gh-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ env:
66
on:
77
push:
88
branches:
9-
- master
9+
- main
1010
jobs:
1111
deploy:
1212
runs-on: ubuntu-latest
@@ -21,7 +21,7 @@ jobs:
2121
uses: actions/cache@v1
2222
id: cache
2323
with:
24-
path:
24+
path:
2525
~/.cargo/registry/index
2626
~/.cargo/registry/cache
2727
~/.cargo/git

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44

55
## [Unreleased] - ReleaseDate
66

7-
[Commits](https://github.com/twitch-rs/twitch_oauth2/compare/v0.8.0...Unreleased)
7+
[Commits](https://github.com/twitch-rs/twitch_oauth2/compare/v0.9.0...Unreleased)
8+
9+
## [v0.9.0] - 2022-10-15
10+
11+
[Commits](https://github.com/twitch-rs/twitch_oauth2/compare/v0.8.0...v0.9.0)
812

913
### Breaking
1014

0 commit comments

Comments
 (0)