diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 60cedd7..9a88785 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -157,8 +157,8 @@ jobs: - linux_zip_aarch64 - linux_tar - linux_tar_aarch64 - - linux_flatpak - - linux_flatpak_aarch64 +# - linux_flatpak +# - linux_flatpak_aarch64 - linux_snap - linux_snap_aarch64 - windows_msi @@ -181,13 +181,26 @@ jobs: - name: Install ts-shasum run: pnpm add --global ts-shasum + - name: Publish a release + run: | + RELEASE="$([[ "$ENV" == "staging" ]] && echo "$TAG_NAME.pre" || echo "$TAG_NAME")" + if [ "$ENV" == "production" ]; then + gh release edit "$RELEASE" --latest --draft=false --tag "$RELEASE" + else + gh release edit "$RELEASE" --prerelease --draft=false --tag "$RELEASE" + fi + env: + ENV: ${{ github.event.inputs.env }} + TAG_NAME: "v${{ needs.create_release.outputs.version }}" + GH_TOKEN: ${{ secrets.CYF_RELEASE_TOKEN }} + - name: Download assets uses: robinraju/release-downloader@v1 with: tag: "v${{ needs.create_release.outputs.version }}${{ github.event.inputs.env == 'staging' && '.pre' || '' }}" fileName: '*' - tarBall: true - zipBall: true + tarBall: false + zipBall: false out-file-path: 'ff-downloads' - name: Gen SHASUMS256.txt @@ -206,19 +219,6 @@ jobs: TAG_NAME: "v${{ needs.create_release.outputs.version }}" GH_TOKEN: ${{ secrets.CYF_RELEASE_TOKEN }} - - name: Publish a release - run: | - RELEASE="$([[ "$ENV" == "staging" ]] && echo "$TAG_NAME.pre" || echo "$TAG_NAME")" - if [ "$ENV" == "production" ]; then - gh release edit "$RELEASE" --latest --draft=false - else - gh release edit "$RELEASE" --prerelease --draft=false - fi - env: - ENV: ${{ github.event.inputs.env }} - TAG_NAME: "v${{ needs.create_release.outputs.version }}" - GH_TOKEN: ${{ secrets.CYF_RELEASE_TOKEN }} - apk: name: Create apk runs-on: ubuntu-latest @@ -2312,214 +2312,214 @@ jobs: rm -f .env - linux_flatpak: - name: Create linux flatpak - runs-on: ubuntu-latest - container: - image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08 - options: --privileged - needs: - - create_release - - linux_deb - steps: - - uses: actions/checkout@v4 - - - name: Install yq - run: | - if ! command -v yq >/dev/null 2>&1; then - echo "yq not exists" - if ! command -v wget >/dev/null 2>&1; then - echo "wget not exists" - sudo dnf -y install wget - fi - wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq &&\ - chmod +x /usr/bin/yq - fi - yq --version - - - name: Update version - run: | - # Update flatpak/com.chenyifaer.FaForever.yml - TAG="$([[ "$ENV" == "staging" ]] && echo "$TAG_NAME.pre" || echo "$TAG_NAME")" - RELEASE="$([[ "$ENV" == "staging" ]] && echo "$VERSION.pre" || echo "$VERSION")" - - url=https://github.com/cyf/faforever/releases/download/"$TAG"/faforever_"$RELEASE"_linux_amd64.deb - wget -O faforever.deb "$url" - sha256=$(sha256sum faforever.deb | awk '{print $1}') - rm -f faforever.deb - url=$url yq -i '.modules[0].sources[0].url = strenv(url)' flatpak/com.chenyifaer.FaForever.yml - sha256=$sha256 yq -i '.modules[0].sources[0].sha256 = strenv(sha256)' flatpak/com.chenyifaer.FaForever.yml - - desktop_url=https://raw.githubusercontent.com/cyf/faforever/"$TAG"/linux/shared/com.chenyifaer.FaForever.desktop - wget -O com.chenyifaer.FaForever.desktop "$desktop_url" - desktop_sha256=$(sha256sum com.chenyifaer.FaForever.desktop | awk '{print $1}') - rm -f com.chenyifaer.FaForever.desktop - desktop_url=$desktop_url yq -i '.modules[0].sources[2].url = strenv(desktop_url)' flatpak/com.chenyifaer.FaForever.yml - desktop_sha256=$desktop_sha256 yq -i '.modules[0].sources[2].sha256 = strenv(desktop_sha256)' flatpak/com.chenyifaer.FaForever.yml - - appdata_url=https://raw.githubusercontent.com/cyf/faforever/"$TAG"/linux/shared/com.chenyifaer.FaForever.metainfo.xml - wget -O com.chenyifaer.FaForever.metainfo.xml "$appdata_url" - appdata_sha256=$(sha256sum com.chenyifaer.FaForever.metainfo.xml | awk '{print $1}') - rm -f com.chenyifaer.FaForever.metainfo.xml - appdata_url=$appdata_url yq -i '.modules[0].sources[3].url = strenv(appdata_url)' flatpak/com.chenyifaer.FaForever.yml - appdata_sha256=$appdata_sha256 yq -i '.modules[0].sources[3].sha256 = strenv(appdata_sha256)' flatpak/com.chenyifaer.FaForever.yml - env: - ENV: ${{ github.event.inputs.env }} - TAG_NAME: "v${{ needs.create_release.outputs.version }}" - VERSION: ${{ needs.create_release.outputs.version }} - - - name: Show config - run: cat flatpak/com.chenyifaer.FaForever.yml - - - name: Build .flatpak - uses: flatpak/flatpak-github-actions/flatpak-builder@master - with: - bundle: FaForever.flatpak - manifest-path: flatpak/com.chenyifaer.FaForever.yml - cache: true - restore-cache: true - cache-key: flatpak-builder-${{ github.sha }}-cache-restored - arch: x86_64 - upload-artifact: false - - # Package the build. - - name: Copy build for flatpak - run: | - ls -la - RELEASE="$([[ "$ENV" == "staging" ]] && echo "$VERSION.pre" || echo "$VERSION")" - mv ./FaForever.flatpak $GITHUB_WORKSPACE/FaForever_"$RELEASE"_linux_amd64.flatpak - env: - ENV: ${{ github.event.inputs.env }} - VERSION: "${{ needs.create_release.outputs.version }}" - - - name: Install gh - run: | - sudo dnf -y install git - sudo dnf -y install 'dnf-command(config-manager)' - sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo - sudo dnf -y install gh --repo gh-cli - - - name: Show gh info - run: gh --version - - - name: Upload assets - run: | - RELEASE="$([[ "$ENV" == "staging" ]] && echo "$TAG_NAME.pre" || echo "$TAG_NAME")" - git config --global --add safe.directory "$GITHUB_WORKSPACE" - gh release upload "$RELEASE" ./*.flatpak - env: - ENV: ${{ github.event.inputs.env }} - TAG_NAME: "v${{ needs.create_release.outputs.version }}" - GH_TOKEN: ${{ secrets.CYF_RELEASE_TOKEN }} - - linux_flatpak_aarch64: - name: Create linux flatpak (aarch64) - runs-on: ubuntu-latest - container: - image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08 - options: --privileged - needs: - - create_release - - linux_deb_aarch64 - steps: - - uses: actions/checkout@v4 - - - name: Install yq - run: | - if ! command -v yq >/dev/null 2>&1; then - echo "yq not exists" - if ! command -v wget >/dev/null 2>&1; then - echo "wget not exists" - sudo dnf -y install wget - fi - wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq &&\ - chmod +x /usr/bin/yq - fi - yq --version - - - name: Update version - run: | - # Update flatpak/com.chenyifaer.FaForever.yml - TAG="$([[ "$ENV" == "staging" ]] && echo "$TAG_NAME.pre" || echo "$TAG_NAME")" - RELEASE="$([[ "$ENV" == "staging" ]] && echo "$VERSION.pre" || echo "$VERSION")" - - url=https://github.com/cyf/faforever/releases/download/"$TAG"/faforever_"$RELEASE"_linux_aarch64.deb - wget -O faforever.deb "$url" - sha256=$(sha256sum faforever.deb | awk '{print $1}') - rm -f faforever.deb - url=$url yq -i '.modules[0].sources[1].url = strenv(url)' flatpak/com.chenyifaer.FaForever.yml - sha256=$sha256 yq -i '.modules[0].sources[1].sha256 = strenv(sha256)' flatpak/com.chenyifaer.FaForever.yml - - desktop_url=https://raw.githubusercontent.com/cyf/faforever/"$TAG"/linux/shared/com.chenyifaer.FaForever.desktop - wget -O com.chenyifaer.FaForever.desktop "$desktop_url" - desktop_sha256=$(sha256sum com.chenyifaer.FaForever.desktop | awk '{print $1}') - rm -f com.chenyifaer.FaForever.desktop - desktop_url=$desktop_url yq -i '.modules[0].sources[2].url = strenv(desktop_url)' flatpak/com.chenyifaer.FaForever.yml - desktop_sha256=$desktop_sha256 yq -i '.modules[0].sources[2].sha256 = strenv(desktop_sha256)' flatpak/com.chenyifaer.FaForever.yml - - appdata_url=https://raw.githubusercontent.com/cyf/faforever/"$TAG"/linux/shared/com.chenyifaer.FaForever.metainfo.xml - wget -O com.chenyifaer.FaForever.metainfo.xml "$appdata_url" - appdata_sha256=$(sha256sum com.chenyifaer.FaForever.metainfo.xml | awk '{print $1}') - rm -f com.chenyifaer.FaForever.metainfo.xml - appdata_url=$appdata_url yq -i '.modules[0].sources[3].url = strenv(appdata_url)' flatpak/com.chenyifaer.FaForever.yml - appdata_sha256=$appdata_sha256 yq -i '.modules[0].sources[3].sha256 = strenv(appdata_sha256)' flatpak/com.chenyifaer.FaForever.yml - env: - ENV: ${{ github.event.inputs.env }} - TAG_NAME: "v${{ needs.create_release.outputs.version }}" - VERSION: ${{ needs.create_release.outputs.version }} - - - name: Show config - run: cat flatpak/com.chenyifaer.FaForever.yml - - - name: Install QEMU deps - run: | - dnf -y install docker - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - - name: Build .flatpak - uses: flatpak/flatpak-github-actions/flatpak-builder@master - with: - bundle: FaForever.flatpak - manifest-path: flatpak/com.chenyifaer.FaForever.yml - cache: true - restore-cache: true - cache-key: flatpak-builder-${{ github.sha }}-cache-restored - arch: aarch64 - upload-artifact: false - - # Package the build. - - name: Copy build for flatpak - run: | - ls -la - RELEASE="$([[ "$ENV" == "staging" ]] && echo "$VERSION.pre" || echo "$VERSION")" - mv ./FaForever.flatpak $GITHUB_WORKSPACE/FaForever_"$RELEASE"_linux_aarch64.flatpak - env: - ENV: ${{ github.event.inputs.env }} - VERSION: ${{ needs.create_release.outputs.version }} - - - name: Install gh - run: | - sudo dnf -y install git - sudo dnf -y install 'dnf-command(config-manager)' - sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo - sudo dnf -y install gh --repo gh-cli - - - name: Show gh info - run: gh --version - - - name: Upload assets - run: | - RELEASE="$([[ "$ENV" == "staging" ]] && echo "$TAG_NAME.pre" || echo "$TAG_NAME")" - git config --global --add safe.directory "$GITHUB_WORKSPACE" - gh release upload "$RELEASE" ./*.flatpak - env: - ENV: ${{ github.event.inputs.env }} - TAG_NAME: "v${{ needs.create_release.outputs.version }}" - GH_TOKEN: ${{ secrets.CYF_RELEASE_TOKEN }} +# linux_flatpak: +# name: Create linux flatpak +# runs-on: ubuntu-latest +# container: +# image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08 +# options: --privileged +# needs: +# - create_release +# - linux_deb +# steps: +# - uses: actions/checkout@v4 +# +# - name: Install yq +# run: | +# if ! command -v yq >/dev/null 2>&1; then +# echo "yq not exists" +# if ! command -v wget >/dev/null 2>&1; then +# echo "wget not exists" +# sudo dnf -y install wget +# fi +# wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq &&\ +# chmod +x /usr/bin/yq +# fi +# yq --version +# +# - name: Update version +# run: | +# # Update flatpak/com.chenyifaer.FaForever.yml +# TAG="$([[ "$ENV" == "staging" ]] && echo "$TAG_NAME.pre" || echo "$TAG_NAME")" +# RELEASE="$([[ "$ENV" == "staging" ]] && echo "$VERSION.pre" || echo "$VERSION")" +# +# url=https://github.com/cyf/faforever/releases/download/"$TAG"/faforever_"$RELEASE"_linux_amd64.deb +# wget -O faforever.deb "$url" +# sha256=$(sha256sum faforever.deb | awk '{print $1}') +# rm -f faforever.deb +# url=$url yq -i '.modules[0].sources[0].url = strenv(url)' flatpak/com.chenyifaer.FaForever.yml +# sha256=$sha256 yq -i '.modules[0].sources[0].sha256 = strenv(sha256)' flatpak/com.chenyifaer.FaForever.yml +# +# desktop_url=https://raw.githubusercontent.com/cyf/faforever/"$TAG"/linux/shared/com.chenyifaer.FaForever.desktop +# wget -O com.chenyifaer.FaForever.desktop "$desktop_url" +# desktop_sha256=$(sha256sum com.chenyifaer.FaForever.desktop | awk '{print $1}') +# rm -f com.chenyifaer.FaForever.desktop +# desktop_url=$desktop_url yq -i '.modules[0].sources[2].url = strenv(desktop_url)' flatpak/com.chenyifaer.FaForever.yml +# desktop_sha256=$desktop_sha256 yq -i '.modules[0].sources[2].sha256 = strenv(desktop_sha256)' flatpak/com.chenyifaer.FaForever.yml +# +# appdata_url=https://raw.githubusercontent.com/cyf/faforever/"$TAG"/linux/shared/com.chenyifaer.FaForever.metainfo.xml +# wget -O com.chenyifaer.FaForever.metainfo.xml "$appdata_url" +# appdata_sha256=$(sha256sum com.chenyifaer.FaForever.metainfo.xml | awk '{print $1}') +# rm -f com.chenyifaer.FaForever.metainfo.xml +# appdata_url=$appdata_url yq -i '.modules[0].sources[3].url = strenv(appdata_url)' flatpak/com.chenyifaer.FaForever.yml +# appdata_sha256=$appdata_sha256 yq -i '.modules[0].sources[3].sha256 = strenv(appdata_sha256)' flatpak/com.chenyifaer.FaForever.yml +# env: +# ENV: ${{ github.event.inputs.env }} +# TAG_NAME: "v${{ needs.create_release.outputs.version }}" +# VERSION: ${{ needs.create_release.outputs.version }} +# +# - name: Show config +# run: cat flatpak/com.chenyifaer.FaForever.yml +# +# - name: Build .flatpak +# uses: flatpak/flatpak-github-actions/flatpak-builder@master +# with: +# bundle: FaForever.flatpak +# manifest-path: flatpak/com.chenyifaer.FaForever.yml +# cache: true +# restore-cache: true +# cache-key: flatpak-builder-${{ github.sha }}-cache-restored +# arch: x86_64 +# upload-artifact: false +# +# # Package the build. +# - name: Copy build for flatpak +# run: | +# ls -la +# RELEASE="$([[ "$ENV" == "staging" ]] && echo "$VERSION.pre" || echo "$VERSION")" +# mv ./FaForever.flatpak $GITHUB_WORKSPACE/FaForever_"$RELEASE"_linux_amd64.flatpak +# env: +# ENV: ${{ github.event.inputs.env }} +# VERSION: "${{ needs.create_release.outputs.version }}" +# +# - name: Install gh +# run: | +# sudo dnf -y install git +# sudo dnf -y install 'dnf-command(config-manager)' +# sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo +# sudo dnf -y install gh --repo gh-cli +# +# - name: Show gh info +# run: gh --version +# +# - name: Upload assets +# run: | +# RELEASE="$([[ "$ENV" == "staging" ]] && echo "$TAG_NAME.pre" || echo "$TAG_NAME")" +# git config --global --add safe.directory "$GITHUB_WORKSPACE" +# gh release upload "$RELEASE" ./*.flatpak +# env: +# ENV: ${{ github.event.inputs.env }} +# TAG_NAME: "v${{ needs.create_release.outputs.version }}" +# GH_TOKEN: ${{ secrets.CYF_RELEASE_TOKEN }} +# +# linux_flatpak_aarch64: +# name: Create linux flatpak (aarch64) +# runs-on: ubuntu-latest +# container: +# image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08 +# options: --privileged +# needs: +# - create_release +# - linux_deb_aarch64 +# steps: +# - uses: actions/checkout@v4 +# +# - name: Install yq +# run: | +# if ! command -v yq >/dev/null 2>&1; then +# echo "yq not exists" +# if ! command -v wget >/dev/null 2>&1; then +# echo "wget not exists" +# sudo dnf -y install wget +# fi +# wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq &&\ +# chmod +x /usr/bin/yq +# fi +# yq --version +# +# - name: Update version +# run: | +# # Update flatpak/com.chenyifaer.FaForever.yml +# TAG="$([[ "$ENV" == "staging" ]] && echo "$TAG_NAME.pre" || echo "$TAG_NAME")" +# RELEASE="$([[ "$ENV" == "staging" ]] && echo "$VERSION.pre" || echo "$VERSION")" +# +# url=https://github.com/cyf/faforever/releases/download/"$TAG"/faforever_"$RELEASE"_linux_aarch64.deb +# wget -O faforever.deb "$url" +# sha256=$(sha256sum faforever.deb | awk '{print $1}') +# rm -f faforever.deb +# url=$url yq -i '.modules[0].sources[1].url = strenv(url)' flatpak/com.chenyifaer.FaForever.yml +# sha256=$sha256 yq -i '.modules[0].sources[1].sha256 = strenv(sha256)' flatpak/com.chenyifaer.FaForever.yml +# +# desktop_url=https://raw.githubusercontent.com/cyf/faforever/"$TAG"/linux/shared/com.chenyifaer.FaForever.desktop +# wget -O com.chenyifaer.FaForever.desktop "$desktop_url" +# desktop_sha256=$(sha256sum com.chenyifaer.FaForever.desktop | awk '{print $1}') +# rm -f com.chenyifaer.FaForever.desktop +# desktop_url=$desktop_url yq -i '.modules[0].sources[2].url = strenv(desktop_url)' flatpak/com.chenyifaer.FaForever.yml +# desktop_sha256=$desktop_sha256 yq -i '.modules[0].sources[2].sha256 = strenv(desktop_sha256)' flatpak/com.chenyifaer.FaForever.yml +# +# appdata_url=https://raw.githubusercontent.com/cyf/faforever/"$TAG"/linux/shared/com.chenyifaer.FaForever.metainfo.xml +# wget -O com.chenyifaer.FaForever.metainfo.xml "$appdata_url" +# appdata_sha256=$(sha256sum com.chenyifaer.FaForever.metainfo.xml | awk '{print $1}') +# rm -f com.chenyifaer.FaForever.metainfo.xml +# appdata_url=$appdata_url yq -i '.modules[0].sources[3].url = strenv(appdata_url)' flatpak/com.chenyifaer.FaForever.yml +# appdata_sha256=$appdata_sha256 yq -i '.modules[0].sources[3].sha256 = strenv(appdata_sha256)' flatpak/com.chenyifaer.FaForever.yml +# env: +# ENV: ${{ github.event.inputs.env }} +# TAG_NAME: "v${{ needs.create_release.outputs.version }}" +# VERSION: ${{ needs.create_release.outputs.version }} +# +# - name: Show config +# run: cat flatpak/com.chenyifaer.FaForever.yml +# +# - name: Install QEMU deps +# run: | +# dnf -y install docker +# +# - name: Set up QEMU +# uses: docker/setup-qemu-action@v3 +# with: +# platforms: arm64 +# +# - name: Build .flatpak +# uses: flatpak/flatpak-github-actions/flatpak-builder@master +# with: +# bundle: FaForever.flatpak +# manifest-path: flatpak/com.chenyifaer.FaForever.yml +# cache: true +# restore-cache: true +# cache-key: flatpak-builder-${{ github.sha }}-cache-restored +# arch: aarch64 +# upload-artifact: false +# +# # Package the build. +# - name: Copy build for flatpak +# run: | +# ls -la +# RELEASE="$([[ "$ENV" == "staging" ]] && echo "$VERSION.pre" || echo "$VERSION")" +# mv ./FaForever.flatpak $GITHUB_WORKSPACE/FaForever_"$RELEASE"_linux_aarch64.flatpak +# env: +# ENV: ${{ github.event.inputs.env }} +# VERSION: ${{ needs.create_release.outputs.version }} +# +# - name: Install gh +# run: | +# sudo dnf -y install git +# sudo dnf -y install 'dnf-command(config-manager)' +# sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo +# sudo dnf -y install gh --repo gh-cli +# +# - name: Show gh info +# run: gh --version +# +# - name: Upload assets +# run: | +# RELEASE="$([[ "$ENV" == "staging" ]] && echo "$TAG_NAME.pre" || echo "$TAG_NAME")" +# git config --global --add safe.directory "$GITHUB_WORKSPACE" +# gh release upload "$RELEASE" ./*.flatpak +# env: +# ENV: ${{ github.event.inputs.env }} +# TAG_NAME: "v${{ needs.create_release.outputs.version }}" +# GH_TOKEN: ${{ secrets.CYF_RELEASE_TOKEN }} linux_snap: name: Create linux snap diff --git a/README.md b/README.md index b0e3a1f..4ce7ba4 100644 --- a/README.md +++ b/README.md @@ -125,8 +125,6 @@

- -