@@ -24,13 +24,19 @@ jobs:
2424 - name : Setup problem matchers for PHP
2525 run : echo "::add-matcher::${{ runner.tool_cache }}/php.json"
2626
27+ # Store the version, stripping any v-prefix
28+ - name : Write release version
29+ run : |
30+ TAG=${{ github.ref_name }}
31+ echo "VERSION=${TAG#v}" >> $GITHUB_ENV
32+
2733 - uses : actions/checkout@v3
2834
2935 - name : Validate composer.json and composer.lock
3036 run : composer validate
3137
3238 - name : Set version in composer.json
33- run : composer config version "${{ github.ref_name }} "
39+ run : composer config version "$VERSION "
3440
3541 - name : Install Composer dependencies
3642 run : composer install --no-progress --no-dev --prefer-dist --optimize-autoloader
@@ -46,16 +52,16 @@ jobs:
4652 - name : Build tarball
4753 run : |
4854 cd ..
49- cp -R simplesamlphp "simplesamlphp-${{ github.ref_name }} "
50- tar --owner 0 --group 0 -cvzf "/tmp/simplesamlphp-${{ github.ref_name }} .tar.gz" \
51- "simplesamlphp-${{ github.ref_name }} "
55+ cp -R simplesamlphp "simplesamlphp-$VERSION "
56+ tar --owner 0 --group 0 -cvzf "/tmp/simplesamlphp-$VERSION .tar.gz" \
57+ "simplesamlphp-$VERSION "
5258
5359 - name : Save tarball
5460 uses : actions/upload-artifact@v3
5561 with :
5662 name : release
57- path : " /tmp/simplesamlphp-${{ github.ref_name }} .tar.gz"
63+ path : " /tmp/simplesamlphp-$VERSION .tar.gz"
5864 retention-days : 1
5965
6066 - name : Calculate SHA checksum
61- run : sha256sum "/tmp/simplesamlphp-${{ github.ref_name }} .tar.gz"
67+ run : sha256sum "/tmp/simplesamlphp-$VERSION .tar.gz"
0 commit comments