diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 00000000..f496c6c0 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,42 @@ +name: publish + +on: + push: + branches: + - master + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Establish Versioning, Tags, and Labels + id: vtl + uses: mapped/action-vtl@latest + with: + baseVersion: 1.0.0 + gitHubToken: ${{ secrets.GITHUB_TOKEN }} + + - name: Install build deps + run: pip install poetry + + - name: Set version + run: poetry version "${{ steps.vtl.outputs.ver_semVerNoMeta }}" + + - name: Build + run: poetry build + + - name: Publish to fury + run: | + VERSION="${{ steps.vtl.outputs.ver_semVerNoMeta }}" + curl -F "package=@dist/betterproto-${VERSION}-py3-none-any.whl" \ + "https://${{ secrets.FURY_PUSH_TOKEN }}@push.fury.io/mapped/" + curl -F "package=@dist/betterproto-${VERSION}.tar.gz" \ + "https://${{ secrets.FURY_PUSH_TOKEN }}@push.fury.io/mapped/" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 84082d00..00096731 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,16 +10,3 @@ repos: - id: ruff args: ["--select", "I", "src", "tests"] - - repo: https://github.com/PyCQA/doc8 - rev: 0.10.1 - hooks: - - id: doc8 - additional_dependencies: - - toml - - - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: v2.14.0 - hooks: - - id: pretty-format-java - args: [--autofix, --aosp] - files: ^.*\.java$