Skip to content

chore: Add release scripts #41

chore: Add release scripts

chore: Add release scripts #41

Workflow file for this run

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: Test
on:
push:
branches:
- '**'
- '!dependabot/**'
tags:
- '**'
pull_request:
concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: 3
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: pre-commit-
- name: Install pre-commit
run: |
python -m pip install pre-commit
- name: Run pre-commit
run: |
pre-commit run --show-diff-on-failure --color=always --all-files
docker:
name: Ubuntu Swift 5.10
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
packages: write
env:
DOCKER_VOLUME_PREFIX: .docker/
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Cache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: .docker
key: docker-${{ hashFiles('**/Package.resolved', '**/go.sum') }}
restore-keys: docker-
- name: Pull
run: |
docker compose pull --ignore-pull-failures ubuntu
- name: Build
run: |
docker compose build ubuntu
- name: Run
run: |
docker compose run --rm ubuntu
- name: Fix permission for .docker/
if: always()
run: |
sudo chown -R ${USER}: .docker
- name: Login to GitHub Container registry
if: >-
github.event_name == 'push' &&
github.repository == 'apache/arrow-swift' &&
github.ref_name == 'main'
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push
if: >-
github.event_name == 'push' &&
github.repository == 'apache/arrow-swift' &&
github.ref_name == 'main'
run: |
docker compose push ubuntu