Skip to content

Commit

Permalink
try tag name
Browse files Browse the repository at this point in the history
  • Loading branch information
timosachsenberg committed Apr 17, 2024
1 parent 64bbb3d commit 92ef8c8
Showing 1 changed file with 7 additions and 23 deletions.
30 changes: 7 additions & 23 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,10 @@ jobs:
outputs:
timestamp: ${{ steps.timestamp.outputs.timestamp }}
steps:
- name: Generate timestamp
id: timestamp
run: echo "timestamp=$(date +%Y%m%d%H%M%S)" | tee $GITHUB_ENV

- name: Save timestamp
uses: actions/upload-artifact@v3
with:
name: timestamp
path: timestamp.txt # Correct path to an actual file

- name: Generate tag name
id: tag_name
run: echo "TAG_NAME=$(date +%Y%m%d%H%M%S)" >> $GITHUB_OUTPUT

build:
needs: prepare
runs-on: ${{ matrix.os }}
Expand All @@ -35,16 +29,6 @@ jobs:
CMAKE_ARGS: -G"Visual Studio 17 2022" -A"x64"

steps:
- name: Download timestamp
uses: actions/download-artifact@v3
with:
name: timestamp

- name: Read timestamp and create tag name
run: |
timestamp=$(cat timestamp)
echo "TAG_NAME=release-$timestamp" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
path: contrib
Expand Down Expand Up @@ -92,8 +76,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd "${{ github.workspace }}/contrib"
git tag ${{ env.TAG_NAME }}
git push origin ${{ env.TAG_NAME }}
git tag ${{ steps.tag_name.outputs.TAG_NAME }}
git push origin ${{ steps.tag_name.outputs.TAG_NAME }}
shell: bash

- name: Clean build and package
Expand All @@ -109,6 +93,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG_NAME }}
tag_name: ${{ steps.tag_name.outputs.TAG_NAME }}
files: |
${{ github.workspace }}/contrib-build/contrib_build-${{runner.os}}.tar.gz

0 comments on commit 92ef8c8

Please sign in to comment.