aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2024-06-04 15:24:15 +0200
committersrdusr <trevorgray@srdusr.com>2024-06-04 15:24:15 +0200
commit07dbcb01b15f905bb95db3ec57a9b1bc6b45cfbf (patch)
tree0da58d0ea554f77d96fe546e92770dfe17134e79 /.github/workflows/release.yml
parentdc43267c2d6fe0725b45e59344c54f45a14dfd33 (diff)
downloaddotfiles-07dbcb01b15f905bb95db3ec57a9b1bc6b45cfbf.tar.gz
dotfiles-07dbcb01b15f905bb95db3ec57a9b1bc6b45cfbf.zip
Testing
Diffstat (limited to '.github/workflows/release.yml')
-rw-r--r--.github/workflows/release.yml47
1 files changed, 47 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..ecdcd06
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,47 @@
+name: Create Release
+
+on:
+ push:
+ tags:
+ - 'v*' # This triggers the workflow on version tags
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Clone dotfiles repository
+ run: git clone --bare https://github.com/srdusr/dotfiles.git $HOME/temp-dotfiles
+
+ - name: Create zip file
+ run: |
+ cd $HOME/temp-dotfiles
+ git archive --format=zip --output=$HOME/dotfiles.zip HEAD
+
+ - name: Clean up temporary clone
+ run: rm -rf $HOME/temp-dotfiles
+
+ - name: Create GitHub Release
+ id: create_release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: ${{ github.ref }}
+ release_name: Release ${{ github.ref }}
+ body: Automatically generated release
+ draft: false
+ prerelease: false
+
+ - name: Upload zip to release
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ steps.create_release.outputs.upload_url }}
+ asset_path: $HOME/dotfiles.zip
+ asset_name: dotfiles.zip
+ asset_content_type: application/zip