2626 outputs :
2727 taggedbranch : ${{ steps.find-branch.outputs.taggedbranch }}
2828 steps :
29- - uses : actions/checkout@v2
29+ - uses : actions/checkout@v3
3030 - run : git fetch --depth=1 origin +refs/tags/*:refs/tags/*
3131 - name : Find which branch the release tag points at
3232 id : find-branch
3636 git fetch --depth=1 origin +refs/heads/*:refs/heads/*
3737 set -x
3838 TAGGEDBRANCH=$(git for-each-ref --points-at=${{github.sha}} --format='%(refname:lstrip=2)' refs/heads/)
39- echo ::set-output name= taggedbranch:: $TAGGEDBRANCH
39+ echo " taggedbranch= $TAGGEDBRANCH" >> $GITHUB_OUTPUT
4040 - name : Set an output
4141 id : set-version
4242 if : runner.os == 'Linux'
@@ -46,41 +46,41 @@ jobs:
4646 [ $GITHUB_EVENT_NAME == 'release' ] && VERSION=${{ github.event.release.tag_name }} && VERSION=${VERSION/v/}
4747 CHANGELOG=$(cat CHANGELOG.md | sed -n "/## \[${VERSION}\]/,/## /p" | sed '/^$/d;1d;$d')
4848 CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
49- echo ::set-output name= changelog:: $CHANGELOG
49+ echo " changelog= $CHANGELOG" >> $GITHUB_OUTPUT
5050 git tag -l | cat
5151 [ $GITHUB_EVENT_NAME == 'push' ] && VERSION+=-beta && VERSION+=.$(($(git tag -l "v$VERSION.*" | sort -nt. -k4 2>/dev/null | tail -1 | cut -d. -f4)+1))
5252 [ $GITHUB_EVENT_NAME == 'pull_request' ] && VERSION+=-dev.${{ github.event.pull_request.number }}
53- echo ::set-output name= version:: $VERSION
53+ echo " version= $VERSION" >> $GITHUB_OUTPUT
5454 NAME=$(jq -r '.name' package.json)-$VERSION
55- echo ::set-output name=name:: $NAME
55+ echo " name=$NAME" >> $GITHUB_OUTPUT
5656 tmp=$(mktemp)
5757 jq --arg version "$VERSION" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
5858 mkdir dist
5959 echo $VERSION > .version
6060 echo $NAME > .name
6161 - name : Use Node.js
62- uses : actions/setup-node@v1
62+ uses : actions/setup-node@v3
6363 with :
64- node-version : 14.x
64+ node-version : 16
6565 - run : npm install
6666 - name : lint
6767 if : runner.os == 'Linux'
6868 run : npm run lint
6969 - run : npm run compile
7070 - name : npm test
71- uses : GabrielBB/xvfb-action @v1.0
71+ uses : coactions/setup-xvfb @v1
7272 with :
7373 run : npm run test
7474 - name : Build pre-release package
7575 if : runner.os == 'Linux'
7676 run : |
7777 npx vsce package --pre-release -o ${{ steps.set-version.outputs.name }}.vsix
78- - uses : actions/upload-artifact@v2
78+ - uses : actions/upload-artifact@v3
7979 if : (runner.os == 'Linux') && (github.event_name != 'release')
8080 with :
8181 name : ${{ steps.set-version.outputs.name }}.vsix
8282 path : ${{ steps.set-version.outputs.name }}.vsix
83- - uses : actions/upload-artifact@v2
83+ - uses : actions/upload-artifact@v3
8484 if : runner.os == 'Linux'
8585 with :
8686 name : meta
9292 runs-on : ubuntu-latest
9393 needs : build
9494 steps :
95- - uses : actions/download-artifact@v2
95+ - uses : actions/download-artifact@v3
9696 with :
9797 name : meta
9898 path : .
@@ -101,58 +101,43 @@ jobs:
101101 if : runner.os == 'Linux'
102102 run : |
103103 set -x
104- echo ::set-output name= version:: `cat .version`
105- echo ::set-output name=name:: `cat .name`
106- - uses : actions/download-artifact@v2
104+ echo " version= `cat .version`" >> $GITHUB_OUTPUT
105+ echo " name=`cat .name`" >> $GITHUB_OUTPUT
106+ - uses : actions/download-artifact@v3
107107 with :
108108 name : ${{ steps.set-version.outputs.name }}.vsix
109109 - name : Create Pre-Release
110- id : create_release
111- uses : actions/create- release@v1
110+ id : create-release
111+ uses : softprops/action-gh- release@v0
112112 if : runner.os == 'Linux'
113- env :
114- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
115113 with :
116114 tag_name : v${{ steps.set-version.outputs.version }}
117- release_name : v${{ steps.set-version.outputs.version }}
118115 prerelease : ${{ github.event_name != 'release' }}
119- body : |
120- Changes in this pre-release
121- ${{ steps.set-version.outputs.changelog }}
122- - name : Upload Pre-Release Asset
123- id : upload-release-asset
124- uses : actions/upload-release-asset@v1
125- if : runner.os == 'Linux'
126- env :
127- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
128- with :
129- upload_url : ${{ steps.create_release.outputs.upload_url }}
130- asset_path : ${{ steps.set-version.outputs.name }}.vsix
131- asset_name : ${{ steps.set-version.outputs.name }}.vsix
132- asset_content_type : application/zip
116+ files : ${{ steps.set-version.outputs.name }}.vsix
117+ token : ${{ secrets.GITHUB_TOKEN }}
133118 publish :
134119 needs : build
135120 if : github.event_name == 'release' && needs.build.outputs.taggedbranch == 'prerelease'
136121 runs-on : ubuntu-latest
137122 steps :
138- - uses : actions/checkout@v2
123+ - uses : actions/checkout@v3
139124 with :
140125 ref : prerelease
141126 token : ${{ secrets.TOKEN }}
142- - uses : actions/download-artifact@v2
127+ - uses : actions/download-artifact@v3
143128 with :
144129 name : meta
145130 path : .
146131 - name : Use Node.js
147- uses : actions/setup-node@v1
132+ uses : actions/setup-node@v3
148133 with :
149- node-version : 14.x
134+ node-version : 16
150135 - name : Prepare pre-release build
151136 id : set-version
152137 run : |
153138 VERSION=`cat .version`
154139 NEXT_VERSION=`cat .version | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
155- echo ::set-output name=name:: `cat .name`
140+ echo " name=`cat .name`" >> $GITHUB_OUTPUT
156141 tmp=$(mktemp)
157142 git config --global user.name 'ProjectBot'
158143 git config --global user.email '[email protected] ' @@ -168,15 +153,12 @@ jobs:
168153 npx vsce package --pre-release -o ${{ steps.set-version.outputs.name }}.vsix
169154 - name : Upload Release Asset
170155 id : upload-release-asset
171- uses : actions/upload-release-asset@v1
156+ uses : softprops/action-gh-release@v0
172157 if : runner.os == 'Linux'
173- env :
174- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
175158 with :
176- upload_url : ${{ github.event.release.upload_url }}
177- asset_path : ${{ steps.set-version.outputs.name }}.vsix
178- asset_name : ${{ steps.set-version.outputs.name }}.vsix
179- asset_content_type : application/zip
159+ tag_name : ${{ github.event.release.tag_name }}
160+ files : ${{ steps.set-version.outputs.name }}.vsix
161+ token : ${{ secrets.GITHUB_TOKEN }}
180162 - name : Publish to VSCode Marketplace
181163 run : |
182164 [ -n "${{ secrets.VSCE_TOKEN }}" ] && \
0 commit comments