Release stable packages #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release stable packages | |
on: | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
sync: | |
name: Moving dev packages to stable | |
runs-on: ubuntu-latest | |
env: | |
RCLONE_CONFIG_SPACES_TYPE: s3 | |
RCLONE_CONFIG_SPACES_PROVIDER: DigitalOcean | |
RCLONE_CONFIG_SPACES_ENV_AUTH: false | |
RCLONE_CONFIG_SPACES_ACCESS_KEY_ID: ${{ secrets.DO_SPACE_ACCESS_KEY }} | |
RCLONE_CONFIG_SPACES_SECRET_ACCESS_KEY: ${{ secrets.DO_SPACE_SECRET_KEY }} | |
RCLONE_CONFIG_SPACES_ENDPOINT: ams3.digitaloceanspaces.com | |
RCLONE_CONFIG_SPACES_ACL: public-read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Publish stable packages | |
run: | | |
git clone ${{ github.repositoryUrl }} nethsecurity | |
pushd nethsecurity | |
git fetch --force --tags --depth 500 | |
MAJOR_VERSION="$(git describe | cut -d'-' -f1)" | |
if [ -z "$MAJOR_VERSION" ]; then | |
echo "No MAJOR_VERSION found" | |
exit 1 | |
fi | |
popd | |
TMP_FILE=$(mktemp) | |
wget https://downloads.rclone.org/v1.66.0/rclone-v1.66.0-linux-amd64.deb -O "$TMP_FILE" | |
sudo dpkg -i "$TMP_FILE" | |
rclone sync -M --no-update-modtime -v --exclude "/targets/**" "spaces:nethsecurity/dev/$MAJOR_VERSION/" "spaces:nethsecurity/stable/$MAJOR_VERSION/" |