diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ae90f85 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,68 @@ +name: Bump release version +on: + pull_request: + branches: [rolling] + types: + - closed + +permissions: + contents: write + pull-requests: write + repository-projects: write + +concurrency: production + +jobs: + build: + name: bump tag version and release + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: ${{ github.sha }} + fetch-depth: 0 + - name: Bump version and push tag + id: version-bump + uses: hennejg/github-tag-action@v4.3.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + release_branches: rolling + - name: create branch + uses: peterjgrainger/action-create-branch@v2.2.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + branch: update-from-${{ github.sha }} + - name: update cargo.toml + run: | + appversion=$(echo "${{ steps.version-bump.outputs.new_tag }}" | sed 's/[v]//') + sed -i -e "s/^version = .*/version = \"$appversion\"/" Cargo.toml + - name: auto commit + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "[skip ci] update Cargo.toml to ${{ steps.version-bump.outputs.new_tag }}" + branch: update-from-${{ github.sha }} + # create PR using GitHub CLI + - name: create PR with update info + id: create-pr + run: gh pr create --base rolling --head update-from-${{ github.sha }} --title 'Merge new update into rolling' --body 'Created by Github action' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # merge PR using GitHub CLI + - name: merge PR with update info + id: merge-pr + run: gh pr merge --admin --merge --subject 'Merge update info' --delete-branch + env: + GH_TOKEN: ${{ secrets.ADMIN_RIGHTS_TOKEN }} + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + generate_release_notes: true + name: ${{ steps.version-bump.outputs.new_tag }} + tag_name: ${{ steps.version-bump.outputs.new_tag }} + prerelease: false + env: + GITHUB_REPOSITORY: ${{ github.repository }} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index fdfbe32..79e6e1d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "websurfx" -version = "1.9.4" +version = "2.0.10" edition = "2021" description = "An open-source alternative to Searx that provides clean, ad-free, and organic results with incredible speed while keeping privacy and security in mind." repository = "https://github.com/neon-mmd/websurfx"