Skip to content

Commit ab4a5cc

Browse files
Fix (#5)
1 parent aa40607 commit ab4a5cc

File tree

6 files changed

+73
-43
lines changed

6 files changed

+73
-43
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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 #fixme url
17+
- run: |
18+
set -e
19+
git remote add github https://${{ secrets.OSS_GITHUB_NAME }}:${{ secrets.OSS_GITHUB_TOKEN }}@github.com/Schleifner/wasm-compiler.git
20+
21+
# Push the current branch
22+
BRANCH_NAME=${GITHUB_REF#refs/heads/}
23+
git push github "$BRANCH_NAME" -f
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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"

.github/workflows/github-sync.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88

99
env:
1010
package_name: wasm-compiler-${{ github.ref_name }}.tar.gz
11+
12+
permissions:
13+
contents: write
14+
1115
jobs:
1216
release:
1317
runs-on: [ubuntu-latest]

.github/workflows/tag.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff 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

RELEASENOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Wasm Compiler Release Notes
2-
2+
## 3.0.4
33
## 3.0.3
44
Add u32 and u64 type to WasmValue
55

0 commit comments

Comments
 (0)