From b772b5974b144d6bf9550ba262c314d55904503c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nat=C3=A1lia=20Granato?= <91998391+nataliagranato@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:19:24 -0300 Subject: [PATCH] add: create release.yml --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2b212ec --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Release + +on: + push: + branches: + - main + paths: + - 'aws-cost-py/**' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + with: + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + + - name: Extract commit hash + id: extract_hash + run: | + # Extract the hash of the latest commit + HASH=$(git rev-parse HEAD) + echo "Commit hash: $HASH" + echo "::set-output name=hash::$HASH" + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ steps.extract_hash.outputs.hash }} + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}