diff --git a/.github/workflows/actions-linter.yaml b/.github/workflows/actions-linter.yaml index d69ea03..5048849 100644 --- a/.github/workflows/actions-linter.yaml +++ b/.github/workflows/actions-linter.yaml @@ -25,4 +25,4 @@ jobs: aqua_version: v2.29.0 - name: run ghalint - run: github-comment exec --token ${{ secrets.token }} -- ghalint run + run: ghalint run diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index d33cd07..57431b6 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -28,7 +28,7 @@ jobs: aqua_version: v2.29.0 - name: set up python - uses: actions/setup-python@v5.1.1 + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 with: python-version: ${{ env.PYTHON_VERSION }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..b4d2e66 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,61 @@ +name: create release on tag +on: + release: + types: [created] + +defaults: + run: + shell: bash + +env: + PYTHON_VERSION: 3.12.4 + PACKAGE_VERSION: 0.1.0 + + +jobs: + create-package: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + # checkout repository to runner + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - name: install package using aqua + uses: aquaproj/aqua-installer@6ce1f8848ec8e61f14d57bd5d7597057a6dd187c # v3.0.1 + with: + aqua_version: v2.29.0 + + - name: set up python + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: run buildd + run: | + rye pin ${{ env.PYTHON_VERSION }} + rye sync + rye build + + + release-package: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./dist + permissions: + contents: write + strategy: + matrix: + package_file: ["my_portscanner-${{ env.PACKAGE_VERSION }}-py3-none-any.whl", "my_portscanner-${{ env.PACKAGE_VERSION }}.tar.gz"] + steps: + - name: clone application source code + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - name: upload Releases + uses: shogo82148/actions-upload-release-asset@8f032eff0255912cc9c8455797fd6d72f25c7ab7 # v1.7.5 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ${{ matrix.package_file }} + asset_name: ${{ matrix.package_file }} diff --git a/aqua.yaml b/aqua.yaml index 3945136..3a9a3e5 100644 --- a/aqua.yaml +++ b/aqua.yaml @@ -11,6 +11,5 @@ registries: ref: v4.193.0 # renovate: depName=aquaproj/aqua-registry packages: - name: suzuki-shunsuke/pinact@v0.2.0 -- name: suzuki-shunsuke/github-comment@v6.0.4 - name: suzuki-shunsuke/ghalint@v0.2.11 - name: astral-sh/rye@0.38.0 diff --git a/github-comment.yaml b/github-comment.yaml deleted file mode 100644 index ed2feba..0000000 --- a/github-comment.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -skip_no_token: true -base: - org: RyosukeDTomita - repo: devsecops-demo-aws-ecs -post: - default: - template: | - {{.Org}}/{{.Repo}} test - hello: - template: | - hello world! -exec: - hello: - - when: true - template: | - {{template "header" .}} - {{.Vars.foo}} {{.Vars.zoo.foo}} - {{.Org}} {{.Repo}} {{.PRNumber}} {{.SHA1}} {{.TemplateKey}} - exit code: {{.ExitCode}} - - ```console - $ {{.Command}} - ``` - - Stdout: - - ``` - {{.Stdout}} - ``` - - Stderr: - - ``` - {{.Stderr}} - ``` - - CombinedOutput: - - ``` - {{.CombinedOutput}} - ``` - template_for_too_long: | - {{template "header" .}} - {{.Vars.foo}} {{.Vars.zoo.foo}} - {{.Org}} {{.Repo}} {{.PRNumber}} {{.SHA1}} {{.TemplateKey}} - exit code: {{.ExitCode}} - - ```console - $ {{.Command}} - ```