diff options
| author | mbkma <[email protected]> | 2025-08-14 21:30:32 +0200 |
|---|---|---|
| committer | Luke from DC <[email protected]> | 2025-08-21 04:18:04 +0000 |
| commit | ed3d1a39b9543bb0acec8b824e1e999952ccb123 (patch) | |
| tree | d1f7d35bccada68f13d06552277dc6c658dc1358 /.github/workflows/release.yml | |
| parent | 7ef327f6f269c7a49357e001cd41d7aaf5807749 (diff) | |
| download | mate-calc-ed3d1a39b9543bb0acec8b824e1e999952ccb123.tar.bz2 mate-calc-ed3d1a39b9543bb0acec8b824e1e999952ccb123.tar.xz | |
use github actions
Diffstat (limited to '.github/workflows/release.yml')
| -rw-r--r-- | .github/workflows/release.yml | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a6cfbb4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,117 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + container: + image: 'fedora:latest' + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install dependencies + run: | + dnf update -y + dnf install -y \ + autoconf-archive \ + clang \ + clang-analyzer \ + bison \ + desktop-file-utils \ + flex \ + gcc \ + git \ + gmp-devel \ + gtk3 \ + libmpc-devel \ + libxml2-devel \ + make \ + mate-common \ + mate-desktop-devel \ + mpfr-devel \ + redhat-rpm-config \ + curl \ + which \ + sha256sum + + - name: Set up environment variables + run: | + export CPU_COUNT=$(nproc) + echo "CPU_COUNT=$CPU_COUNT" >> $GITHUB_ENV + echo "REPO_NAME=mate-calc" >> $GITHUB_ENV + echo "OWNER_NAME=mate-desktop" >> $GITHUB_ENV + + - name: Generate build system + run: | + NOCONFIGURE=1 ./autogen.sh + + - name: Configure + run: | + ./configure --enable-compile-warnings=maximum + + - name: Build + run: | + make -j $CPU_COUNT + + - name: Create distribution archive + run: | + make distcheck + + - name: Generate checksums + run: | + for file in mate-calc-*.tar.xz; do + if [ -f "$file" ]; then + sha256sum "$file" > "$file.sha256" + fi + done + + - name: Notify release servers + run: | + # Notify MATE release servers (if configured) + if [ -n "${{ secrets.RELEASE_NOTIFY_TOKEN }}" ]; then + curl -X POST -H "Authorization: token ${{ secrets.RELEASE_NOTIFY_TOKEN }}" \ + -d '{"tag":"${{ github.ref_name }}","repo":"mate-calc"}' \ + https://release.mate-desktop.org/release || echo "Release notification failed" + fi + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + draft: false + prerelease: false + generate_release_notes: true + files: | + mate-calc-*.tar.xz + mate-calc-*.tar.xz.sha256 + body: | + Release ${{ github.ref_name }} of MATE Calculator + + This release includes the source distribution archive and checksums. + + ## Installation + + Download the `mate-calc-*.tar.xz` file and verify it with the corresponding `.sha256` checksum file: + + ```bash + sha256sum -c mate-calc-*.tar.xz.sha256 + ``` + + Then extract and build: + + ```bash + tar -xf mate-calc-*.tar.xz + cd mate-calc-* + ./configure + make + sudo make install + ``` + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file |
