From 22ded15ba9844b8ee35778f7c90d79da750cfd81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asiel=20D=C3=ADaz=20Ben=C3=ADtez?= Date: Mon, 6 Jun 2022 02:55:12 -0400 Subject: [PATCH] Create release-python.yml --- .github/workflows/release-python.yml | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/release-python.yml diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml new file mode 100644 index 0000000000..9c907e9bd9 --- /dev/null +++ b/.github/workflows/release-python.yml @@ -0,0 +1,37 @@ +name: Create .xdc release if build steps involve python + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v3 + - name: build .xdc file + id: build + run: | + pip3 install -U pip + pip3 install -U wheel + pip3 install -r requirements.txt + python3 build.py -n ${{ github.event.repository.name }} + # This is just a little control flow hack. This ensures the correct file name is uploaded. + if [[ ${{ github.event.repository.name }} == *.xdc ]] + then + exit 1 + fi + continue-on-error: true + - uses: ncipollo/release-action@v1 + if: steps.build.outcome != 'success' + with: + artifacts: ${{ github.event.repository.name }} + - uses: ncipollo/release-action@v1 + if: steps.build.outcome == 'success' + with: + artifacts: ${{ github.event.repository.name }}.xdc +