File tree Expand file tree Collapse file tree 1 file changed +33
-7
lines changed
Expand file tree Collapse file tree 1 file changed +33
-7
lines changed Original file line number Diff line number Diff line change 11name : Main
2+
23on :
34 push :
45 branches : main
89jobs :
910 deploy :
1011 name : Main
11- runs-on : ${{ matrix.os }}
12- strategy :
13- matrix :
14- os : [ubuntu-latest, macos-latest] # taking out windows-latest for now: ending issue
12+ runs-on : ubuntu-latest
1513
1614 permissions :
17- id-token : write # Needed for auth with Deno Deploy
18- contents : read # Needed to clone the repository
15+ id-token : write # Needed for auth with Deno Deploy
16+ contents : write # Needed to push updates and create a release
1917
2018 steps :
2119 - name : Clone repository
3533 - name : Test Deno code
3634 run : deno test
3735
36+ - name : Extract version from code
37+ id : get_version
38+ run : echo "VERSION=$(deno eval 'import { VERSION } from "./version.ts"; console.log(VERSION);')" >> $GITHUB_ENV
39+
40+ - name : Update README with version
41+ run : |
42+ sed -i "s/Version: .*/Version: $VERSION/" README.md
43+
44+ - name : Commit README changes
45+ run : |
46+ git config --global user.name "github-actions"
47+ git config --global user.email "github-actions@github.com"
48+ git add README.md
49+ git commit -m "chore: update README to version $VERSION" || echo "No changes to commit"
50+ git push origin main || echo "No changes to push"
51+
3852 - name : Build Deno code
39- run : deno compile --allow-net --allow-read --allow-write --output=dist/git-mirror git-mirror.ts
53+ run : deno compile --allow-net --allow-read --allow-write --output=dist/git-mirror git-mirror.ts
54+
55+ - name : Create GitHub Release
56+ id : create_release
57+ uses : softprops/action-gh-release@v2
58+ with :
59+ tag_name : v${{ env.VERSION }}
60+ name : Release v${{ env.VERSION }}
61+ draft : false
62+ prerelease : false
63+ files : dist/git-mirror
64+ env :
65+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments