1+ ---
12name : " Tagger - Move semantic tags!"
23description : " Automatically move your semantic tags on release."
34branding :
@@ -19,23 +20,47 @@ inputs:
1920runs :
2021 using : " composite"
2122 steps :
22- - uses : robinraju/release-downloader@v1.3
23- with :
24- repository : " fischerscode/tagger"
25- fileName : " tagger.linux"
26- out-file-path : ${{ github.action_path }}
27- tag : v0.1.0
28- - run : |
29- mv ${{ github.action_path }}/tagger.linux ${{ github.action_path }}/tagger
30- chmod +x ${{ github.action_path }}/tagger
31- shell: bash
32- - run : ${{ github.action_path }}/tagger move -s -p '${{inputs.prefix}}' ${INPUTS_TAG##*/}
33- shell : bash
23+ - name : Collect info
24+ id : info
25+ run : |
26+ if [ "${{ runner.os }}" = "Windows" ]; then
27+ bin=$DIR\\tagger.exe
28+ else
29+ bin="$DIR/tagger"
30+ fi
31+ echo "BIN=$bin" >> $GITHUB_OUTPUT
32+ shell : sh
33+ env :
34+ DIR : ${{ runner.temp }}
35+ - name : Download tagger (Linux, macOS)
36+ if : ${{ runner.os != 'Windows' }}
37+ run : |
38+ if [ "${{ runner.os }}" = "Linux" ]; then
39+ suffix=linux
40+ else
41+ suffix=mac
42+ fi
43+ wget https://github.com/fischerscode/tagger/releases/download/v0.1.0/tagger.${suffix} -O ${{ steps.info.outputs.BIN }}
44+ chmod +x ${{ steps.info.outputs.BIN }}
45+ shell : sh
46+ - name : Download tagger (Windows)
47+ if : ${{ runner.os == 'Windows' }}
48+ run : |
49+ Invoke-WebRequest -URI https://github.com/fischerscode/tagger/releases/download/v0.1.0/tagger.windows.exe -OutFile $Env:BIN
50+ echo "Saved to $Env:BIN"
51+ shell : pwsh
3452 env :
35- INPUTS_TAG : ${{inputs.tag }}
36- - run : rm ${{ github.action_path }}/tagger
53+ BIN : ${{ steps.info.outputs.BIN }}
54+ - run : $BIN move -s -p ' ${{ inputs.prefix }}' ${INPUTS_TAG##*/}
3755 shell : bash
56+ env :
57+ INPUTS_TAG : ${{ inputs.tag }}
58+ BIN : ${{ steps.info.outputs.BIN }}
59+ - run : rm $BIN
60+ shell : sh
61+ env :
62+ BIN : ${{ steps.info.outputs.BIN }}
3863 - run : |
39- repo=" https://${GITHUB_ACTOR}:${INPUT_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
64+ repo=$(echo "${{ github.repositoryUrl }}" | sed "s,git://, https://${GITHUB_ACTOR}:${INPUT_TOKEN}@,")
4065 git push "$repo" --tags --force
41- shell: bash
66+ shell: sh
0 commit comments