From 02999e5bfce9a1fb823f3a5a32729e03978740a9 Mon Sep 17 00:00:00 2001 From: Ignasi Fosch Date: Sat, 28 Dec 2024 11:42:29 +0100 Subject: [PATCH] Fix release pipeline --- .github/workflows/release.yaml | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2659db3..4ac39a7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,19 +10,28 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Get tag name - id: tag_name - run: | - echo "name=SOURCE_TAG::${GITHUB_REF#refs/tags/}" >> ${GITHUB_OUTPUT} - name: Build and publish Docker image run: | + echo ${{ steps.vars.outputs.tag }} echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u EDyO --password-stdin - docker build --pull --rm -f "appu/Dockerfile" -t ghcr.io/edyo/appu:${{ steps.tag_name.outputs.SOURCE_TAG }} appu/. - docker push ghcr.io/edyo/appu:${{ steps.tag_name.outputs.SOURCE_TAG }} + docker build --pull --rm -f "appu/Dockerfile" -t ghcr.io/edyo/appu:${{ github.ref_name }} appu/. + docker push ghcr.io/edyo/appu:${{ github.ref_name }} release: needs: - docker runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Create Release + run: | + echo ${{ secrets.TEST_TOKEN }} | gh auth login --with-token + gh release create ${{ github.ref_name }} + publish: + needs: + - docker + - release + runs-on: ubuntu-latest strategy: matrix: destination_os: [linux, windows, darwin] @@ -39,9 +48,7 @@ jobs: - name: Build run: | scripts/build.sh ${{ matrix.destination_os }} amd64 - - name: Get the version - id: get_version - run: echo "name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)" >> ${GITHUB_OUTPUT} - name: Release built binaries - run: "echo ${{ secrets.TEST_TOKEN }} | gh auth login --with-token \ngh release upload ${{ steps.get_version.outputs.VERSION }} build/*" - + run: | + echo ${{ secrets.TEST_TOKEN }} | gh auth login --with-token + gh release upload ${{ github.ref_name }} build/*