Skip to content

Commit

Permalink
ci(release): updated release workflow to remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherpickering committed Jun 27, 2023
1 parent cdfc123 commit 3484d80
Showing 1 changed file with 0 additions and 152 deletions.
152 changes: 0 additions & 152 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,155 +47,3 @@ jobs:
semantic_version: 18
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}

- name: 📦 Packaging Install deps
if: steps.semantic.outputs.new_release_published == 'true'
run: |
sudo apt-get update
sudo apt-get install dh-make devscripts dpkg-dev gzip apt-utils -y
- name: 🗝️ Load GPG Keys
if: steps.semantic.outputs.new_release_published == 'true'
run: |
# gpg --export-secret-keys <key id> | base64
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
env:
GPG_SIGNING_KEY: ${{ secrets.PPA_GPG_SECRET }}

- name: 💾 Checkout
if: steps.semantic.outputs.new_release_published == 'true'
uses: actions/checkout@v3
with:
persist-credentials: false
path: atlas

- name: 🏗️ Build .deb
if: steps.semantic.outputs.new_release_published == 'true'
run: |
cd ./atlas/packages
cp -r "atlas-hub-<version>" "atlas-hub-$VERSION"
cd "atlas-hub-$VERSION"
find . -type f -name "*" -exec sed -i'' -e "s/<version>/$VERSION/g" {} +
echo "building"
debuild --no-tgz-check -us -uc
cd ..
ls
env:
VERSION: ${{ steps.semantic.outputs.new_release_version }}

- name: 💾 Checkout PPA
if: steps.semantic.outputs.new_release_published == 'true'
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
repository: atlas-bi/ppa
token: ${{ secrets.PPA_REPO_PAT }}
path: ppa

- name: 🐑 Move deb to PPA
if: github.ref_name == 'main' && steps.semantic.outputs.new_release_published == 'true'
run: |
cp ./atlas/packages/*.deb ./ppa/deb/pool/stable
- name: 🐑 Move alpha deb to PPA
if: github.ref_name == 'alpha' && steps.semantic.outputs.new_release_published == 'true'
run: |
cp ./atlas/packages/*.deb ./ppa/deb/pool/unstable
- name: 💾 Commit changes
if: steps.semantic.outputs.new_release_published == 'true'
run: |
cd ./ppa
git config --local user.name "$USER"
git config --local user.email "$EMAIL"
git add .
git commit -m "added atlas-hub $VERSION"
env:
VERSION: ${{ steps.semantic.outputs.new_release_version }}
USER: ${{ secrets.GIT_USER }}
EMAIL: ${{ secrets.GIT_EMAIL }}

- name: 🤙 Push changes
if: steps.semantic.outputs.new_release_published == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PPA_REPO_PAT }}
branch: master
directory: ppa
repository: atlas-bi/ppa

# validate-latest:
# needs: release
# runs-on: ubuntu-latest

# steps:
# - name: Sleep for 5 mins for apt to update
# run: sleep 300s
# shell: bash

# - name: update apt list
# if: needs.release.outputs.new_release_published == 'true'
# run: |
# sudo apt update
# sudo apt install curl gnupg2
# curl -s "https://packages.atlas.bi/scripts/deb.sh" | sudo bash -

# # add alpha builds
# echo "deb [arch=all] https://packages.atlas.bi/deb/ ./unstable main" | sudo tee -a /etc/apt/sources.list.d/atlas.list
# sudo apt update

# - name: install
# if: needs.release.outputs.new_release_published == 'true'
# run: sudo apt install -y atlas-hub=$VERSION
# env:
# VERSION: ${{ needs.release.outputs.new_release_version }}

# - name: check install is online
# if: needs.release.outputs.new_release_published == 'true'
# run: |
# curl https://raw.githubusercontent.com/orangemug/bash-assert/master/assert.sh > assert.sh
# source ./assert.sh
# assert $(curl -s -o /dev/null -w "%{http_code}" localhost/login) -eq 200
# # we can login?
# if [[ ! $(curl -X POST localhost/login?user=admin 2> /dev/null | grep -oP href=\"/\") == href=\"/\" ]]; then exit 1; fi

# - name: uninstall
# if: needs.release.outputs.new_release_published == 'true'
# run: sudo apt remove atlas-hub

# validate-upgrade:
# needs: release
# runs-on: ubuntu-latest

# steps:
# - name: Sleep for 5 mins for apt to update
# run: sleep 300s
# shell: bash

# - name: update apt list
# if: needs.release.outputs.new_release_published == 'true'
# run: |
# sudo apt update
# sudo apt install curl gnupg2
# curl -s "https://packages.atlas.bi/scripts/deb.sh" | sudo bash -

# # add alpha builds
# echo "deb [arch=all] https://packages.atlas.bi/deb/ ./unstable main" | sudo tee -a /etc/apt/sources.list.d/atlas.list
# sudo apt update

# - name: install
# if: needs.release.outputs.new_release_published == 'true'
# run: sudo apt install -y atlas-hub=$VERSION
# env:
# VERSION: ${{ needs.release.outputs.last_release_version }}

# - name: upgrade
# if: needs.release.outputs.new_release_published == 'true'
# run: sudo apt install -y atlas-hub=$VERSION
# env:
# VERSION: ${{ needs.release.outputs.new_release_version }}

# - name: uninstall
# if: needs.release.outputs.new_release_published == 'true'
# run: sudo apt remove atlas-hub

0 comments on commit 3484d80

Please sign in to comment.