Skip to content
This repository was archived by the owner on Mar 14, 2026. It is now read-only.

Commit 5ed03d6

Browse files
authored
Merge pull request #6 from UNHCSC/3-feat-setup-cicd-for-github-releases
feat: setup cicd for github release (#3)
2 parents 5625ae2 + 65e0aa3 commit 5ed03d6

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Github Release Automation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout git repo
13+
uses: actions/checkout@v6
14+
15+
- name: Set release tag
16+
run: echo "RELEASE_TAG=commit-${GITHUB_SHA::7}" >> $GITHUB_ENV
17+
18+
- name: Zip contents of repo
19+
run: zip -r ccdc26-${RELEASE_TAG}.zip . -x ".git/*" ".github/*" "README.md"
20+
21+
- name: Create GitHub release
22+
uses: softprops/action-gh-release@v1
23+
with:
24+
tag_name: ${{ env.RELEASE_TAG }}
25+
name: Release ${{ env.RELEASE_TAG }}
26+
body: "Automated release for commit ${{ github.sha }}"
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Upload zip of repo
31+
uses: softprops/action-gh-release@v1
32+
with:
33+
tag_name: ${{ env.RELEASE_TAG }}
34+
name: ccdc26-${{ env.RELEASE_TAG }}.zip
35+
asset_path: ccdc26-${{ env.RELEASE_TAG }}.zip
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)