2022-07-13 11:35:23 +03:00
|
|
|
name: Release artifacts
|
|
|
|
|
2022-07-13 11:25:21 +03:00
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
source-tarball:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout Hyprland
|
|
|
|
id: checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Create tarball with submodules
|
|
|
|
id: tar
|
2023-04-27 16:28:40 +03:00
|
|
|
run: |
|
2023-08-07 14:35:19 +03:00
|
|
|
sed -i "1s/^/#define GIT_COMMIT_HASH \"$(git rev-parse HEAD)\"\n#define GIT_TAG \"$(git describe --tags)\"\n/" ./src/macros.hpp
|
2023-04-27 16:28:40 +03:00
|
|
|
mkdir hyprland-source; mv ./* ./hyprland-source || tar -czv --owner=0 --group=0 --no-same-owner --no-same-permissions -f source.tar.gz *
|
2022-07-13 11:25:21 +03:00
|
|
|
|
|
|
|
- id: whatrelease
|
|
|
|
name: Get latest release
|
|
|
|
uses: pozetroninc/github-action-get-latest-release@master
|
|
|
|
with:
|
2022-07-13 11:39:57 +03:00
|
|
|
owner: hyprwm
|
2022-07-13 11:25:21 +03:00
|
|
|
repo: Hyprland
|
|
|
|
excludes: prerelease, draft
|
|
|
|
|
|
|
|
- name: Upload to release
|
|
|
|
id: upload
|
|
|
|
uses: svenstaro/upload-release-action@v2
|
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
file: source.tar.gz
|
2022-07-13 11:35:23 +03:00
|
|
|
asset_name: source-${{ steps.whatrelease.outputs.release }}.tar.gz
|
2022-07-13 11:25:21 +03:00
|
|
|
tag: ${{ steps.whatrelease.outputs.release }}
|
2022-07-13 11:35:23 +03:00
|
|
|
overwrite: true
|