build(deps): bump actions/setup-node from 3 to 4 #268
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: ci | |
on: push | |
env: | |
GITHUB_TOKEN: ${{ secrets.issue_github_token }} | |
CONAN_SYSREQUIRES_MODE: enabled | |
PYTHONUNBUFFERED: 1 | |
jobs: | |
ci-frontend: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Setup npm | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "16" | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build static site | |
run: | | |
cd ccb-frontend | |
npm install | |
npm run build | |
- name: Deploy site | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
folder: ccb-frontend/dist | |
clean: true | |
ci: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Prepare ccache timestamp | |
id: ccache_cache_timestamp | |
run: | | |
echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_OUTPUT | |
- name: Configure ccache cache files | |
uses: actions/cache@v3 | |
with: | |
path: ~/.ccache | |
key: ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} | |
restore-keys: | | |
ccache- | |
- name: Install and configure ccache | |
run: | | |
sudo apt-get install ccache | |
ccache --version | |
ccache -s | |
echo "/usr/lib/ccache" >> $GITHUB_PATH | |
- name: Install and configure conan | |
run: | | |
python3 -m pip install "conan<2" | |
conan config install https://github.com/conan-io/hooks.git -sf hooks -tf hooks | |
conan config set hooks.conan-center | |
conan profile new default --detect | |
conan profile update settings.compiler.libcxx=libstdc++11 default | |
conan profile update conf.tools.system.package_manager:mode=install default | |
conan profile update conf.tools.system.package_manager:sudo=True default | |
conan profile show default | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Edit version for release | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
run: | | |
CCB_VERSION=${GITHUB_REF:10} | |
echo "Version: $CCB_VERSION" | |
sed -i "s/\"0.0.0\"/\"$CCB_VERSION\"/" ccb/_version.py | |
- name: Install CCB locally | |
run: python3 -m pip install . | |
- name: Pylint | |
run: | | |
python3 -m pip install pylint | |
pylint ccb | |
- name: Clone CCI | |
run: | | |
git clone https://qchateau:[email protected]/conan-center-bot-testing/conan-center-index.git | |
cd conan-center-index | |
git remote add upstream https://github.com/conan-io/conan-center-index.git | |
git fetch upstream | |
git checkout upstream/master | |
git config --global user.email "[email protected]" | |
git config --global user.name "Quentin Chateau via Conan Center Bot" | |
- name: Update recipes | |
run: | | |
mkdir status | |
conan-center-bot auto-update-recipes \ | |
--cci conan-center-index \ | |
--github-token "$GITHUB_TOKEN" \ | |
--push-to origin \ | |
> ./status/v1-update.json | |
cat ./status/v1-update.json | |
- name: Update dev issue | |
run: | | |
conan-center-bot update-status-issue \ | |
--no-link-pr \ | |
--github-token "$GITHUB_TOKEN" \ | |
./status/v1-update.json \ | |
https://github.com/qchateau/conan-center-bot/issues/4 | |
- name: Package | |
run: python3 setup.py sdist | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: status | |
folder: status | |
target-folder: dev | |
clean: false | |
- name: Publish package | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} |