From 6cc0ee01fe5a31af5683ecf21febab1abce346da Mon Sep 17 00:00:00 2001 From: Lauro Correia Silveira Date: Fri, 15 Dec 2023 11:49:44 +0100 Subject: [PATCH] Update action Create Release (#74) - Updated to use actions/checkout@v3 - Added Run to run command to create release --- .github/workflows/create-release.yml | 20 +++++++------------ .../springdoc/SpringdocConfiguration.java | 10 ++++++---- .../controller/VideoControllerTest.java | 2 +- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index ba281a3..483ef46 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -3,26 +3,20 @@ name: Create Release on: push: tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 - + - 'v*' jobs: build: name: Create Release runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@master + uses: actions/checkout@v3 - name: Create Release - id: create_release - uses: actions/create-release@latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - body: | - Changes in this Release - - First Change - - Second Change - draft: false - prerelease: false \ No newline at end of file + run: | + gh release create "$GITHUB_REF_NAME" \ + --repo="$GITHUB_REPOSITORY" \ + --title="${GITHUB_REPOSITORY#*/} ${GITHUB_REF_NAME#v}" \ + --generate-notes \ No newline at end of file diff --git a/src/main/java/com/alura/aluraflixapi/infraestructure/springdoc/SpringdocConfiguration.java b/src/main/java/com/alura/aluraflixapi/infraestructure/springdoc/SpringdocConfiguration.java index 5036185..cd338b2 100644 --- a/src/main/java/com/alura/aluraflixapi/infraestructure/springdoc/SpringdocConfiguration.java +++ b/src/main/java/com/alura/aluraflixapi/infraestructure/springdoc/SpringdocConfiguration.java @@ -17,15 +17,17 @@ public OpenAPI customOpenAPI() { .components(new Components() .addSecuritySchemes("bearer-key", new SecurityScheme().type(SecurityScheme.Type.HTTP).scheme("bearer").bearerFormat("JWT"))) - .info(new Info().title("alura-flix-api") - .description("An API Rest about movies and series that implements Get, Post, Put and Delet methods." - + " Also implements JWT security with Spring Framework") + .info(new Info() + .title("alura-flix-api") + .description("An API Rest about movies and series that implements Get, Post, Put and Delete methods." + + " Also implements JWT security with Spring Framework and use MongoDB Atlas as database" + "\n" + + "There is a user of test you can use, username: guest@aluraflix.com, password: 123456" + "\n" + "Please, note that some endpoints are security and this use do not have some permissions." + + "any problem let me know by my contact.") .contact(new Contact() .name("Lauro Correia") .email("lauro.silveira@ymail.com")) .license(new License() .name("Apache 2.0") - .url("http://voll.med/api/licenca") ) ); } diff --git a/src/test/java/com/alura/aluraflixapi/controller/VideoControllerTest.java b/src/test/java/com/alura/aluraflixapi/controller/VideoControllerTest.java index 24fffb7..277c677 100644 --- a/src/test/java/com/alura/aluraflixapi/controller/VideoControllerTest.java +++ b/src/test/java/com/alura/aluraflixapi/controller/VideoControllerTest.java @@ -53,7 +53,7 @@ @ExtendWith(SpringExtension.class) //@WebMvcTest: Includes both the @AutoConfigureWebMvc and the @AutoConfigureMockMvc, among other functionality. @WebMvcTest -//this anotation can be replaced at each test method scope +//this annotation can be replaced at each test method scope @WithMockUser(value = "admin", username = "admin", password = "admin", roles = "ADMIN") class VideoControllerTest {