diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml new file mode 100644 index 0000000..ada6e1b --- /dev/null +++ b/.github/workflows/create_release.yml @@ -0,0 +1,31 @@ +name: Release + +on: + # Triggers the workflow on pull request events to the main branch + push: + branches: [ main ] + +jobs: + + release: + name: Create Release + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set release name + run: echo "release_name=v$(cat buildSrc/src/main/java/BuildConfigVersions.kt | grep versionName | awk '{print substr($5, 2, length($5)-2) }')" >> $GITHUB_ENV + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ env.release_name }} + + release_name: ${{ env.release_name }} + draft: false + prerelease: false \ No newline at end of file diff --git a/.github/workflows/validate_pr.yml b/.github/workflows/validate_pr.yml index e885dc9..2f344ff 100644 --- a/.github/workflows/validate_pr.yml +++ b/.github/workflows/validate_pr.yml @@ -1,8 +1,7 @@ -# Controls when the workflow will run name: Validate PR on: - # Triggers the workflow on pull request events to the develop branch + # Triggers the workflow on pull request events to the main branch pull_request: branches: [ main ] diff --git a/buildSrc/src/main/java/BuildConfigVersions.kt b/buildSrc/src/main/java/BuildConfigVersions.kt index 928273f..1e695fb 100644 --- a/buildSrc/src/main/java/BuildConfigVersions.kt +++ b/buildSrc/src/main/java/BuildConfigVersions.kt @@ -3,5 +3,5 @@ object BuildConfigVersions { const val minSdk = 23 const val targetSdk = 31 const val versionCode = 1 - const val versionName = "0.0.2" + const val versionName = "0.0.4" }