File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -96,12 +96,37 @@ jobs:
9696 needs : build
9797 runs-on : ubuntu-latest
9898 steps :
99+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
100+
99101 - name : Download build artifacts
100102 uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
101103 with :
102104 path : release
103105 merge-multiple : true
104106
107+ - name : Create source archive
108+ run : |
109+ set -euo pipefail
110+
111+ RAW_TAG="${GITHUB_REF_NAME}"
112+ VERSION="${RAW_TAG#v}"
113+ ARCHIVE_FOLDER="typescript-go-${VERSION}"
114+ ARCHIVE_NAME="${ARCHIVE_FOLDER}-source.zip"
115+ TMP_DIR="$(mktemp -d)"
116+ SOURCE_DIR="${TMP_DIR}/${ARCHIVE_FOLDER}"
117+
118+ mkdir -p "${SOURCE_DIR}"
119+
120+ rsync -a \
121+ --exclude='.git/' \
122+ --exclude='release/' \
123+ --exclude='node_modules/' \
124+ --exclude='testdata/' \
125+ ./ "${SOURCE_DIR}/"
126+
127+ mkdir -p release
128+ (cd "${TMP_DIR}" && zip -9 -r "${GITHUB_WORKSPACE}/release/${ARCHIVE_NAME}" "${ARCHIVE_FOLDER}")
129+
105130 - name : Create or update GitHub release
106131 env :
107132 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments