Skip to content

update actions/checkout to v6 and actions/github-script to v8 #14

update actions/checkout to v6 and actions/github-script to v8

update actions/checkout to v6 and actions/github-script to v8 #14

Workflow file for this run

on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: |
sudo apt-get install -y rpm
sudo gem install fpm package_cloud
- name: Build
run: |
make deb
make rpm
- name: Deploy
if: ${{ github.ref == 'refs/heads/main' }}
run: |
PACKAGECLOUD_REPO="cs50/repo"
# Deploy deb to ubuntu repos
UBUNTU_REPOS=( xenial yakkety zesty artful bionic cosmic disco eoan focal groovy hirsute impish jammy )
for repo in "${UBUNTU_REPOS[@]}"; do
package_cloud push "$PACKAGECLOUD_REPO"/ubuntu/"$repo" build/deb/*.deb
done
# Deploy rpm to fedora repos
for repo in $(seq 28 36); do
package_cloud push "$PACKAGECLOUD_REPO"/fedora/"$repo" build/rpm/*.rpm
done
env:
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
- name: Extract version from Makefile
id: make_version
run: |
echo ::set-output name=version::$(make version)
- name: Create Release
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/github-script@v8
with:
github-token: ${{ github.token }}
script: |
github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: "v${{ steps.make_version.outputs.version }}",
tag_commitish: "${{ github.sha }}"
})