File tree Expand file tree Collapse file tree 6 files changed +84
-43
lines changed
Expand file tree Collapse file tree 6 files changed +84
-43
lines changed Original file line number Diff line number Diff line change 1+ name : sync branches to github
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - master
8+ - develop
9+ - " release/*"
10+ workflow_dispatch :
11+
12+ jobs :
13+ sync-branches :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v4
17+ - name : Check token availability
18+ run : |
19+ if [ -z "${{ secrets.OSS_GITHUB_TOKEN }}" ]; then
20+ echo "ERROR: OSS_GITHUB_TOKEN is empty or not set"
21+ exit 1
22+ else
23+ echo "OSS_GITHUB_TOKEN is available (length: ${#OSS_GITHUB_TOKEN})"
24+ fi
25+ env :
26+ OSS_GITHUB_TOKEN : ${{ secrets.OSS_GITHUB_TOKEN }}
27+ - run : |
28+ set -e
29+ # Use token directly in the git push command with credential helper
30+ BRANCH_NAME=${GITHUB_REF#refs/heads/}
31+ echo "https://${{ secrets.OSS_GITHUB_NAME }}:${{ secrets.OSS_GITHUB_TOKEN }}@github.com" > ~/.git-credentials
32+ git config --global credential.helper store
33+ git remote add github https://github.com/Schleifner/wasm-compiler.git
34+ git push github "$BRANCH_NAME" -f
Original file line number Diff line number Diff line change 1+ name : sync tags to github
2+
3+ on :
4+ push :
5+ tags :
6+ - " *"
7+ workflow_dispatch :
8+ inputs :
9+ tag_name :
10+ description : " Tag name to sync"
11+ required : false
12+ type : string
13+
14+ jobs :
15+ sync-tag :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0 # fixme url
21+ - run : |
22+ set -e
23+ git remote add github https://${{ secrets.OSS_GITHUB_NAME }}:${{ secrets.OSS_GITHUB_TOKEN }}@github.com/Schleifner/wasm-compiler.git
24+
25+ # Determine tag name: from manual input or from push event
26+ if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
27+ TAG_NAME="${{ github.event.inputs.tag_name }}"
28+ else
29+ # It's a tag push event
30+ TAG_NAME="${GITHUB_REF#refs/tags/}"
31+ fi
32+
33+ echo "Syncing tag: $TAG_NAME"
34+ git push github "$TAG_NAME"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 88
99env :
1010 package_name : wasm-compiler-${{ github.ref_name }}.tar.gz
11+
12+ permissions :
13+ contents : write
14+
1115jobs :
1216 release :
1317 runs-on : [ubuntu-latest]
Original file line number Diff line number Diff line change @@ -15,15 +15,16 @@ jobs:
1515 - uses : actions/checkout@v4
1616 with :
1717 fetch-depth : -1
18- - name : Configure git for release tagging
19- run : |
20- git config --global user.email "[email protected] " 21- git config --global user.name "GitHub Release Bot"
22-
23- - name : Create release tag
18+ - name : Extract version from RELEASENOTES.md
19+ id : get_version
2420 run : |
2521 version_info=$(sed -n '/^##/{s/^##//;s/ //g;p;q;}' RELEASENOTES.md)
26- new_tag_name=$version_info
27- echo "new_tag_name will be: $new_tag_name"
28- git tag -a $new_tag_name -m '[GITHUB CI] push new tag'
29- git push origin HEAD:${{ github.ref_name }} $new_tag_name
22+ echo "version=$version_info" >> $GITHUB_OUTPUT
23+
24+ - name : Create tag
25+ uses :
mathieudutour/[email protected] 26+ with :
27+ github_token : ${{ secrets.TECH_USER_ATC_GITHUB_TOKEN }}
28+ custom_tag : ${{ steps.get_version.outputs.version }}
29+ tag_prefix : " "
30+ create_annotated_tag : true
Original file line number Diff line number Diff line change 11# Wasm Compiler Release Notes
2-
2+ ## 3.0.4
33## 3.0.3
44Add u32 and u64 type to WasmValue
55
You can’t perform that action at this time.
0 commit comments