diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml new file mode 100644 index 00000000..425574ae --- /dev/null +++ b/.github/workflows/create_release.yml @@ -0,0 +1,27 @@ +name: Create Release + +on: + push: + tags: + - "*.*.*" + +jobs: + build: + name: Create release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Extract release notes + id: extract-release-notes + uses: ffurrer2/extract-release-notes@v1 + - name: Create release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: false + prerelease: false + body: ${{ steps.extract-release-notes.outputs.release_notes }} diff --git a/.github/workflows/docker_build_and_push_to_dockerhub.yml b/.github/workflows/docker_build_and_push_to_dockerhub.yml index 7884a0e8..6d4a03f9 100644 --- a/.github/workflows/docker_build_and_push_to_dockerhub.yml +++ b/.github/workflows/docker_build_and_push_to_dockerhub.yml @@ -8,6 +8,20 @@ jobs: build_and_push_docker_image: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + # list of Docker images to use as base name for tags + images: | + openbookpublishers/thoth + # generate Docker tags based on the following events/attributes + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} - name: Set up QEMU uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx @@ -22,7 +36,8 @@ jobs: uses: docker/build-push-action@v2 with: push: true - tags: openbookpublishers/thoth:latest + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} build-args: | THOTH_GRAPHQL_API=https://api.thoth.pub THOTH_EXPORT_API=https://export.thoth.pub diff --git a/CHANGELOG.md b/CHANGELOG.md index b8ce8489..1eb1a36f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to thoth will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [[0.4.3]](https://github.com/thoth-pub/thoth/releases/tag/v0.4.3) - 2021-07-28 +### Added + - [#48](https://github.com/thoth-pub/thoth/issues/48) - Implement OAPEN ONIX 3.0 specification + +### Fixed + - [#254](https://github.com/thoth-pub/thoth/issues/254) - Ensure order of fields in create work match those in edit work + ## [[0.4.2]](https://github.com/thoth-pub/thoth/releases/tag/v0.4.2) - 2021-07-05 ### Added - [#125](https://github.com/thoth-pub/thoth/issues/125) - Implement `ISBN` type to standardise parsing diff --git a/Cargo.lock b/Cargo.lock index 325f5e22..cca63b20 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3936,7 +3936,7 @@ dependencies = [ [[package]] name = "thoth" -version = "0.4.2" +version = "0.4.3" dependencies = [ "cargo-husky", "clap", @@ -3951,7 +3951,7 @@ dependencies = [ [[package]] name = "thoth-api" -version = "0.4.2" +version = "0.4.3" dependencies = [ "actix-web", "argon2rs", @@ -3980,7 +3980,7 @@ dependencies = [ [[package]] name = "thoth-api-server" -version = "0.4.2" +version = "0.4.3" dependencies = [ "actix-cors", "actix-identity", @@ -3995,7 +3995,7 @@ dependencies = [ [[package]] name = "thoth-app" -version = "0.4.2" +version = "0.4.3" dependencies = [ "anyhow", "chrono", @@ -4018,7 +4018,7 @@ dependencies = [ [[package]] name = "thoth-app-server" -version = "0.4.2" +version = "0.4.3" dependencies = [ "actix-cors", "actix-web", @@ -4027,7 +4027,7 @@ dependencies = [ [[package]] name = "thoth-client" -version = "0.4.2" +version = "0.4.3" dependencies = [ "chrono", "graphql_client", @@ -4041,7 +4041,7 @@ dependencies = [ [[package]] name = "thoth-errors" -version = "0.4.2" +version = "0.4.3" dependencies = [ "actix-web", "csv", @@ -4056,7 +4056,7 @@ dependencies = [ [[package]] name = "thoth-export-server" -version = "0.4.2" +version = "0.4.3" dependencies = [ "actix-cors", "actix-web", diff --git a/Cargo.toml b/Cargo.toml index 22e50036..18f53cee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth" -version = "0.4.2" +version = "0.4.3" authors = ["Javier Arias ", "Ross Higman "] edition = "2018" license = "Apache-2.0" @@ -16,11 +16,11 @@ maintenance = { status = "actively-developed" } members = ["thoth-api", "thoth-api-server", "thoth-app", "thoth-app-server", "thoth-client", "thoth-errors", "thoth-export-server"] [dependencies] -thoth-api = { version = "0.4.2", path = "thoth-api", features = ["backend"] } -thoth-api-server = { version = "0.4.2", path = "thoth-api-server" } -thoth-app-server = { version = "0.4.2", path = "thoth-app-server" } -thoth-errors = { version = "0.4.2", path = "thoth-errors" } -thoth-export-server = { version = "0.4.2", path = "thoth-export-server" } +thoth-api = { version = "0.4.3", path = "thoth-api", features = ["backend"] } +thoth-api-server = { version = "0.4.3", path = "thoth-api-server" } +thoth-app-server = { version = "0.4.3", path = "thoth-app-server" } +thoth-errors = { version = "0.4.3", path = "thoth-errors" } +thoth-export-server = { version = "0.4.3", path = "thoth-export-server" } clap = "2.33.3" dialoguer = "0.7.1" dotenv = "0.9.0" diff --git a/thoth-api-server/Cargo.toml b/thoth-api-server/Cargo.toml index 1b05925e..f542a490 100644 --- a/thoth-api-server/Cargo.toml +++ b/thoth-api-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-api-server" -version = "0.4.2" +version = "0.4.3" authors = ["Javier Arias ", "Ross Higman "] edition = "2018" license = "Apache-2.0" @@ -9,8 +9,8 @@ repository = "https://github.com/thoth-pub/thoth" readme = "README.md" [dependencies] -thoth-api = { version = "0.4.2", path = "../thoth-api", features = ["backend"] } -thoth-errors = { version = "0.4.2", path = "../thoth-errors" } +thoth-api = { version = "0.4.3", path = "../thoth-api", features = ["backend"] } +thoth-errors = { version = "0.4.3", path = "../thoth-errors" } actix-web = "3.3.2" actix-cors = "0.5.4" actix-identity = "0.3.1" diff --git a/thoth-api/Cargo.toml b/thoth-api/Cargo.toml index 8b73b4de..682cf003 100644 --- a/thoth-api/Cargo.toml +++ b/thoth-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-api" -version = "0.4.2" +version = "0.4.3" authors = ["Javier Arias ", "Ross Higman "] edition = "2018" license = "Apache-2.0" @@ -16,7 +16,7 @@ maintenance = { status = "actively-developed" } backend = ["diesel", "diesel-derive-enum", "diesel_migrations", "futures", "actix-web"] [dependencies] -thoth-errors = { version = "0.4.2", path = "../thoth-errors" } +thoth-errors = { version = "0.4.3", path = "../thoth-errors" } actix-web = { version = "3.3.2", optional = true } argon2rs = "0.2.5" isbn2 = "0.4.0" diff --git a/thoth-app-server/Cargo.toml b/thoth-app-server/Cargo.toml index 6d765517..8a4893cf 100644 --- a/thoth-app-server/Cargo.toml +++ b/thoth-app-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-app-server" -version = "0.4.2" +version = "0.4.3" authors = ["Javier Arias ", "Ross Higman "] edition = "2018" license = "Apache-2.0" diff --git a/thoth-app/Cargo.toml b/thoth-app/Cargo.toml index 3fbaf090..7488784a 100644 --- a/thoth-app/Cargo.toml +++ b/thoth-app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-app" -version = "0.4.2" +version = "0.4.3" authors = ["Javier Arias ", "Ross Higman "] edition = "2018" license = "Apache-2.0" @@ -33,5 +33,5 @@ serde = { version = "1.0.115", features = ["derive"] } serde_json = "1.0" url = "2.1.1" uuid = { version = "0.7", features = ["serde", "v4"] } -thoth-api = { version = "0.4.2", path = "../thoth-api" } -thoth-errors = { version = "0.4.2", path = "../thoth-errors" } +thoth-api = { version = "0.4.3", path = "../thoth-api" } +thoth-errors = { version = "0.4.3", path = "../thoth-errors" } diff --git a/thoth-app/manifest.json b/thoth-app/manifest.json index 2f6f7830..bc08a5f0 100644 --- a/thoth-app/manifest.json +++ b/thoth-app/manifest.json @@ -9,7 +9,7 @@ "start_url": "/?homescreen=1", "background_color": "#ffffff", "theme_color": "#ffdd57", - "version": "0.4.2", + "version": "0.4.3", "icons": [ { "src": "\/android-icon-36x36.png", diff --git a/thoth-app/src/component/new_work.rs b/thoth-app/src/component/new_work.rs index 33a9a10b..2c583c67 100644 --- a/thoth-app/src/component/new_work.rs +++ b/thoth-app/src/component/new_work.rs @@ -716,17 +716,17 @@ impl Component for NewWorkComponent { /> + - String; + fn onix_projectmuse_endpoint(&self) -> String; + fn onix_oapen_endpoint(&self) -> String; fn csv_endpoint(&self) -> String; fn cover_alt_text(&self) -> String; fn license_icons(&self) -> Html; @@ -112,13 +113,20 @@ pub trait DisplayWork { } impl DisplayWork for WorkWithRelations { - fn onix_endpoint(&self) -> String { + fn onix_projectmuse_endpoint(&self) -> String { format!( "{}/specifications/onix_3.0::project_muse/work/{}", THOTH_EXPORT_API, &self.work_id ) } + fn onix_oapen_endpoint(&self) -> String { + format!( + "{}/specifications/onix_3.0::oapen/work/{}", + THOTH_EXPORT_API, &self.work_id + ) + } + fn csv_endpoint(&self) -> String { format!( "{}/specifications/csv::thoth/work/{}", @@ -308,10 +316,16 @@ impl DisplayWork for WorkWithRelations {