diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b33cd4a..c2dbb05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -235,7 +235,7 @@ jobs: ATCODER_USERNAME: ${{ secrets.ATCODER_USERNAME }} ATCODER_PASSWORD: ${{ secrets.ATCODER_PASSWORD }} - upload: + upload-archives: strategy: fail-fast: false matrix: @@ -304,10 +304,48 @@ jobs: name: assets path: ${{ steps.asset.outputs.asset }} + upload-release-notes: + name: Upload the release notes + runs-on: ubuntu-20.04 + if: startsWith(github.ref, 'refs/tags/') + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Prepare release notes + run: | + with open('./CHANGELOG.md') as file: + changelog = file.read() + output = '' + inside_subsection = False + for line in changelog.splitlines(): + is_h2 = line.startswith('## ') + if not inside_subsection and is_h2: + inside_subsection = True + elif inside_subsection and not is_h2: + output += line + '\n' + elif inside_subsection: + break + with open('./release-notes.md', 'w') as file: + file.write(output) + shell: python + + - name: Upload the release notes + uses: actions/upload-artifact@v2 + with: + name: release-notes + path: release-notes.md + release: name: GitHub Release runs-on: ubuntu-20.04 - needs: [rustfmt, build, upload] + needs: [rustfmt, build, upload-archives, upload-release-notes] steps: - name: Download the assets @@ -316,9 +354,16 @@ jobs: name: assets path: ./assets + - name: Download the release notes + uses: actions/download-artifact@v2 + with: + name: release-notes + path: . + - name: GH Release uses: softprops/action-gh-release@v1 with: + body_path: ./release-notes.md files: ./assets/* env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 394236c..030c4a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ # Changelog -## [Unreleased] +## [0.8.0] - 2021-01-24Z ### Added -- Added `add` command. +- Added `add` command. ([#114](https://github.com/qryxip/cargo-compete/pull/114)) ```toml # for Library-Checker @@ -65,14 +65,14 @@ ### Changed -- Made `package.metadata.cargo-compete.config` optional. +- Made `package.metadata.cargo-compete.config` optional. ([#112](https://github.com/qryxip/cargo-compete/pull/112)) ```diff [package.metadata.cargo-compete] -config = "../compete.toml" ``` -- Added new formats for `package.metadata.cargo-compete.bin`. +- Added new formats for `package.metadata.cargo-compete.bin`. ([#113](https://github.com/qryxip/cargo-compete/pull/113)) ```toml [package.metadata.cargo-compete.bin] @@ -90,7 +90,7 @@ ### Fixed -- Fixed a problem about hyphen-separated contest IDs. +- Fixed a problem about hyphen-separated contest IDs. ([#114](https://github.com/qryxip/cargo-compete/pull/114)) ## [0.7.1] - 2021-01-21Z diff --git a/Cargo.lock b/Cargo.lock index 17fa572..3d161f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -201,7 +201,7 @@ checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" [[package]] name = "cargo-compete" -version = "0.7.1" +version = "0.8.0" dependencies = [ "anyhow", "atty", @@ -2691,9 +2691,9 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301bdd13d23c49672926be451130892d274d3ba0b410c18e00daa7990ff38d99" +checksum = "d8208a331e1cb318dd5bd76951d2b8fc48ca38a69f5f4e4af1b6a9f8c6236915" dependencies = [ "once_cell", ] diff --git a/Cargo.toml b/Cargo.toml index 7901145..8d13cef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-compete" -version = "0.7.1" +version = "0.8.0" authors = ["Ryo Yamashita "] edition = "2018" license = "MIT OR Apache-2.0" @@ -43,7 +43,7 @@ prettytable-rs = "0.8.0" reqwest = { version = "0.11.0", default-features = false, features = ["blocking"] } rpassword = "5.0.1" rprompt = "1.0.5" -serde = { version = "1.0.120", features = ["derive"] } +serde = { version = "1.0.121", features = ["derive"] } serde_ignored = "0.1.2" serde_json = "1.0.61" serde_yaml = "0.8.15" @@ -63,6 +63,6 @@ which = "4.0.2" term_size = "=1.0.0-beta.2" [dev-dependencies] -insta = { version = "1.5.2", features = ["redactions"] } +insta = { version = "1.5.3", features = ["redactions"] } once_cell = "1.5.2" regex = "1.4.3"